I have run into an interesting issue with the jQuery UI slider. I need to assign its min and max values from sript and am doing the following
$("#sliCSSHt").slider('values',[minh,maxh]);
$("#sliCSSHt").slider('refresh');
The problem arises when minh = maxh. The MIN button appears to go and sit on TOP of the max button. The innocent user who then tries to inrease the max value finds that the slider has beome unresponsive since he/she is actually dragging the min button beyond the current position of the max button. What if anything can be done to get round this?
I am using jQuery UI 1.91 with jQuery 1.82 - I don't have the option of moving up to jQuery 1.9 since I am using plugins that use the browser object which has now been taken out of jQuery.
You could always stop the sliders from overlapping. Something like
$( "#sliCSSHt" ).on( "slide", function( event, ui ) {
if(ui.values[0]+10 > ui.values[1])
return false;
} );
http://jsfiddle.net/c934g/5/
Update
This bug is fixed in the latest jquery-ui
using the latest jquery-ui files http://code.jquery.com/ui/1.10.3/jquery-ui.js it works.
http://jsfiddle.net/c934g/7/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With