oBo oBo - 5 months ago 33
jQuery Question

Jquery UI Slider change value of slider when changed in input field

im trying to get the slider to jump to the correct position when I change the value in the input field.
Iam using the Jquery UI slider jqueryui.com/slider/.

Please help.

Heres a js fiddle http://jsfiddle.net/p4gqJ/

Answer

You attach to the change event of your input like so:

$( "#storlek_testet" ).change(function() {
    $( "#storlekslider" ).slider( "value", $(this).val() );
}