diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-07-03 15:33:20 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-07-03 15:33:20 +0000 |
commit | 17b2d9526ab9fec734e054ce06a31040e1c0ab3c (patch) | |
tree | 69064f7f318cb7668ee95686037c0052558fa73a /ui | |
parent | c0710fb6b281bf1092ecab6f0c9febdcf06c6133 (diff) | |
download | jquery-ui-17b2d9526ab9fec734e054ce06a31040e1c0ab3c.tar.gz jquery-ui-17b2d9526ab9fec734e054ce06a31040e1c0ab3c.zip |
slider: animate is a bit smoother now - stops the previous animation
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.slider.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 82645e3e0..fc4cbd870 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -400,7 +400,7 @@ $.widget("ui.slider", { x = this.translateLimits(x, "x"); x = this.translateRange(x, "x"); - o.animate ? this.currentHandle.animate({ left: x }, (Math.abs(parseInt(this.currentHandle.css("left")) - x)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ left: x }); + o.animate ? this.currentHandle.stop().animate({ left: x }, (Math.abs(parseInt(this.currentHandle.css("left")) - x)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ left: x }); } if(o.axis != "horizontal" && y !== undefined) { @@ -408,7 +408,7 @@ $.widget("ui.slider", { y = this.translateValue(y, "y"); y = this.translateLimits(y, "y"); y = this.translateRange(y, "y"); - o.animate ? this.currentHandle.animate({ top: y }, (Math.abs(parseInt(this.currentHandle.css("top")) - y)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ top: y }); + o.animate ? this.currentHandle.stop().animate({ top: y }, (Math.abs(parseInt(this.currentHandle.css("top")) - y)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ top: y }); } if (this.rangeElement) |