aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.slider.js')
-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" +