Will this do what you want?
$("#slider-text-box").blur(function() { $("#slider").slider('option', 'value', parseInt($(this).val())); });
Each option on the slider has a setter, as well as a getter, so you can set a value with this, as in the example above. From the documentation:
//getter var value = $('.selector').slider('option', 'value'); //setter $('.selector').slider('option', 'value', 37);
UPDATE:
For dual sliders you need to use:
$("#amount").blur(function () { $("#slider-range").slider("values", 0, parseInt($(this).val())); }); $("#amount2").blur(function () { $("#slider-range").slider("values", 1, parseInt($(this).val())); });
You need to use Math.min/max to make sure that one value does not pass the other, since the installer does not seem to prevent this.
You were almost there when you used $("#slider-range").slider("values", 0) to get each value. Many jQuery have a get / set convention in which an extra parameter is used to set the value.
source share