Search code examples
jqueryjquery-ui-slider

Jquery ui slider range not working in IE


Jquery ui slider range change event is not working in IE browser

$("#borrow_field").on('change', function(){
    alert('yes');
     var brCurrentValue = $("#slider-range").slider('option', 'value');
    setTimeout(function(){
        $("#slider-range").slider("value", brCurrentValue);
    },200);
});

I had used the callback function in slider also, but not working


Solution

  • See this fiddle.

    $("#slider-range").slider();
    $("#borrow_field").on("change", function() {
      setTimeout(function() {
        $("#slider-range")
    
          .slider("value",
            $("#borrow_field").val()
          );
    
      }, 200);
    });
    

    I'm assuming you're trying to do update both ways, where you can update the borrow field based on the slider value, and update the borrow field manually (which should be reflected in the slider - and is perhaps what your javascript is meant to do).

    In which case, you were not getting the input value properly.