Reputation: 21058
i am using jquery slider . Is there any default function to display slider value under slider object
Upvotes: 0
Views: 919
Reputation: 8170
No, there is no 'default function' to display slider value under slider object.
Upvotes: 0
Reputation: 187030
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) {
...
});
Upvotes: 3