Reputation: 1539
how to show my slider values in inputs, so when user is dragging a slider - the values will be dynamically shown in the inputs next to each slider?
Here's example:
Upvotes: 0
Views: 442
Reputation: 27102
Use the slider events as detailed on http://jqueryui.com/demos/slider/:
eg:
$( ".selector" ).slider({
slide: function(event, ui) {
// value is supplied in ui.value for single-handled sliders
var currentValue = ui.value;
$("#yourinputbox").val(currentValue);
}
});
Upvotes: 0
Reputation: 65254
$(".slider").slider({
slide: function(event, ui) {
$(this).next().val(ui.value);
}
});
http://jsfiddle.net/reigel/YHmkp/1/
Upvotes: 2