Skip to content

Instantly share code, notes, and snippets.

@don-smith
Created May 18, 2011 03:35
Show Gist options
  • Save don-smith/977948 to your computer and use it in GitHub Desktop.
Save don-smith/977948 to your computer and use it in GitHub Desktop.
Does destroy need to use both this.element and this.widget()?
...
$.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