]> source.dussan.org Git - jquery-ui.git/commitdiff
#4385 - fixed a bug in the test page: values were being displayed even if they didn...
authorRichard Worth <rdworth@gmail.com>
Sat, 21 Mar 2009 22:14:34 +0000 (22:14 +0000)
committerRichard Worth <rdworth@gmail.com>
Sat, 21 Mar 2009 22:14:34 +0000 (22:14 +0000)
tests/visual/slider/slider_ticket_4385.html

index 4689f782861e22ad88eef9b89737c8f1b40b59e2..f2582d97d5f0bf67d07f6f6c240551ceaa78e819 100644 (file)
@@ -15,8 +15,9 @@
                        max: 500,
                        values: [75, 300],
                        slide: function(event, ui) {
-                               $("#rangevalue").text(ui.values[0] + ' - ' + ui.values[1]);
-                               return ((ui.values[1] - ui.values[0]) > 50);
+                               var minMet = ((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));