#4385 - fixed a bug in the test page: values were being displayed even if they didn't meet minrange

This commit is contained in:
Richard Worth 2009-03-21 22:14:34 +00:00
parent 18a418d21a
commit 71dbad6bc6

View File

@ -15,8 +15,9 @@
max: 500, max: 500,
values: [75, 300], values: [75, 300],
slide: function(event, ui) { slide: function(event, ui) {
$("#rangevalue").text(ui.values[0] + ' - ' + ui.values[1]); var minMet = ((ui.values[1] - ui.values[0]) > 50);
return ((ui.values[1] - ui.values[0]) > 50); minMet && $("#rangevalue").text(ui.values[0] + ' - ' + ui.values[1]);
return minMet;
} }
}); });
$("#rangevalue").text($("#slider").slider("values", 0) + ' - ' + $("#slider").slider("values", 1)); $("#rangevalue").text($("#slider").slider("values", 0) + ' - ' + $("#slider").slider("values", 1));