jquery sliders position
jquery sliders position
Hi,
I'm trying to understand the slider in UI (I am not a good js coder). I've 2
sliders and when I move one, i'd like get the position of the slider I juste
moved. not the value but the 'left' percentage.
here's my code :
$('#slider0').slider({
range: true,
animate: true,
values: [17, 67],
slide: function(event, ui) {
$("#amount0").html('$' + ui.values[0] + ' - $' + ui.values[1]);
},
});
in the slide event, ui or event, are both objects but i don't understand in
the source code how to use them.
in the documentation, there seems to be 2 properties : ui.handle and
ui.value. ui.handle juste returns "http://localhost/#" and ui.values[0]
gives me the value but not the position of the handle.
I tried
$("#sliderposition").html($("#slider0 a:first").css("left"));
on the slide event but the values are wrong. Not to much but always 1% more
or less. depending the direction the slider moved.
can anyone help please ?
Thanks in advance,
Chag
--
View this message in context: http://www.nabble.com/jquery-sliders-position-tp22477411s27240p22477411.html
Sent from the jQuery UI Discussion mailing list archive at Nabble.com.