i am using jquery slider . Is there any default function to display slider value under slider object
+2
A:
Get or set the value option, after init. From option-value
var value = $('.selector').slider('option', 'value');
Determines the value of the slider, if there's only one handle. If there is more than one handle, determines the value of the first handle.
Edit:
Use the slide event for displaying the value when the slider is changed
This event is triggered on every mouse move during slide. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.
Code examples
Supply a callback function to handle the slide event as an init option.
$('.selector').slider({
slide: function(event, ui) { ... }
});
Bind to the slide event by type: slide.
$('.selector').bind('slide', function(event, ui) {
...
});
rahul
2009-10-01 12:50:06
May I know the reason for down vote?
rahul
2009-10-01 12:56:16
i need a solution to display the value not to set the value
Paniyar
2009-10-01 13:05:04
This one gets the value in the variable 'value'.
rahul
2009-10-01 13:05:35
ya you are right but i'm asking any default function along with slider. To set manually we have to take care of the alignment using css
Paniyar
2009-10-01 13:07:47