Your code will add new pagination slider each time you change the value of $("aduhhh")
, since you call .pagination
on a callback.
$(function() {
var initValue = 10;
$("#aduhh").val(initValue);
var mySlider = $("#slider").pagination({
value : initValue,
total : 100,
step : 1,
next : 1,
onChange : function(value) {
$("#aduhh").val(value);
}
});
$("#aduhh").change(function() {
var currentValue = $("#aduhh").val();
mySlider.slider.value = currentValue;
$("#slider span").text(currentValue);
})
})