How to get the handler position
        Posted  
        
            by Geetha
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Geetha
        
        
        
        Published on 2010-05-03T11:17:38Z
        Indexed on 
            2010/05/03
            11:28 UTC
        
        
        Read the original article
        Hit count: 282
        
Hi All,
I am using the following files to create a slider.
<link type="text/css" href="CSS/demos.css" rel="stylesheet" />
<link type="text/css" href="CSS/jquery-ui.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/jquery.ui.slider.js"></script>
Problem:
i want to get the index of the handler, when i drag it to some other position.
Ex:
initial position of the handler:
l--------------------------------
value = 0
After dragging it some other position
----------------------l----------
value = ?
Code:
 var endTime = document.mediaPlayer.SelectionEnd;
 $("#slider-constraints").slider({
                animate: true,
                max: endTime,
                range: $R(0, endTime),
                value: 1,
                enforceConstraints: false,
                start: function(event, index) { alert(index.value); }
            });
 window.setInterval(function() {
                $('#slider-constraints').slider("value", document.mediaPlayer.currentPosition);
            }, 4000);
© Stack Overflow or respective owner