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);