Created
May 18, 2011 03:35
-
-
Save don-smith/977948 to your computer and use it in GitHub Desktop.
Does destroy need to use both this.element and this.widget()?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
$.Widget.prototype = { | |
... | |
destroy: function() { | |
this.element | |
.unbind( "." + this.widgetName ) | |
.removeData( this.widgetName ); | |
this.widget() | |
.unbind( "." + this.widgetName ) | |
.removeAttr( "aria-disabled" ) | |
.removeClass( | |
this.widgetBaseClass + "-disabled " + | |
"ui-state-disabled" ); | |
}, | |
widget: function() { | |
return this.element; | |
}, | |
} | |
.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment