Reputation: 13
Im trying to change slider max value on change event like this.
$("#slider-1").slider( "option", "max", $("#slider-0").val() );
In console i see that it changes, but it does not affect the sliders behavior like id hope it would. I have tried using the .slider("refresh") method but it does not help.
Is there any trick to update the slider so it uses the newly assigned max value?
Upvotes: 1
Views: 334
Reputation: 57309
Working example: http://jsfiddle.net/Gajotres/DTKDh/
$(document).on('pagebeforeshow', '#index', function(){
$("#slider-1").attr("max", 200).slider('refresh');
});
Upvotes: 2