aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-06-03 15:14:08 -0400
committerScott González <scott.gonzalez@gmail.com>2013-06-03 15:14:46 -0400
commit2ba75e2c93638d89e89de52347da0013a7a841b8 (patch)
tree01fd7789c9b1ba6371ecf9bd77a597b04213e6c8 /ui
parent3ec371bca47f614249b90e0b7dfd7bf7389588af (diff)
downloadjquery-ui-2ba75e2c93638d89e89de52347da0013a7a841b8.tar.gz
jquery-ui-2ba75e2c93638d89e89de52347da0013a7a841b8.zip
Slider: Remove range div when changing range option to false. Fixes #9355 - Slider: Changing range option to false does not remove range div.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.slider.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index ee7b3538f..e4f1cf7c9 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -131,7 +131,10 @@ $.widget( "ui.slider", $.ui.mouse, {
this.range.addClass( classes +
( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
} else {
- this.range = $([]);
+ if ( this.range ) {
+ this.range.remove();
+ }
+ this.range = null;
}
},
@@ -145,7 +148,9 @@ $.widget( "ui.slider", $.ui.mouse, {
_destroy: function() {
this.handles.remove();
- this.range.remove();
+ if ( this.range ) {
+ this.range.remove();
+ }
this.element
.removeClass( "ui-slider" +