Skip to content

Commit 30d431b

Browse files
committed
Slider: Improve destroy method
1 parent f667bb3 commit 30d431b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

ui/jquery.ui.spinner.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,18 +331,12 @@ $.widget('ui.spinner', {
331331
},
332332

333333
destroy: function() {
334-
if ($.fn.mousewheel) {
335-
this.element.unmousewheel();
336-
}
337-
338334
this.element
339335
.removeClass('ui-spinner-input')
340336
.removeAttr('disabled')
341-
.removeAttr('autocomplete')
342-
.removeData('spinner')
343-
.unbind(".spinner");
344-
345-
this.uiSpinner.replaceWith(this.element);
337+
.removeAttr('autocomplete');
338+
$.Widget.prototype.destroy.call( this );
339+
this.uiSpinner.replaceWith(this.element);
346340
},
347341

348342
enable: function() {

0 commit comments

Comments
 (0)