mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Slider: Improve destroy method
This commit is contained in:
parent
f667bb3c8d
commit
30d431b08a
10
ui/jquery.ui.spinner.js
vendored
10
ui/jquery.ui.spinner.js
vendored
@ -331,17 +331,11 @@ $.widget('ui.spinner', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
if ($.fn.mousewheel) {
|
|
||||||
this.element.unmousewheel();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.element
|
this.element
|
||||||
.removeClass('ui-spinner-input')
|
.removeClass('ui-spinner-input')
|
||||||
.removeAttr('disabled')
|
.removeAttr('disabled')
|
||||||
.removeAttr('autocomplete')
|
.removeAttr('autocomplete');
|
||||||
.removeData('spinner')
|
$.Widget.prototype.destroy.call( this );
|
||||||
.unbind(".spinner");
|
|
||||||
|
|
||||||
this.uiSpinner.replaceWith(this.element);
|
this.uiSpinner.replaceWith(this.element);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user