Skip to content

Instantly share code, notes, and snippets.

@devdays
Created February 26, 2015 19:42
Show Gist options
  • Save devdays/f22821fd1fd12ba5dd05 to your computer and use it in GitHub Desktop.
Save devdays/f22821fd1fd12ba5dd05 to your computer and use it in GitHub Desktop.
Clean up in your widget
_destroy: function () {
// Use the destroy method to reverse everything your plugin has applied
this.filterInput.parent().remove();
// Remove any classes, including CSS framework classes, that you applied
this.filterElems.removeClass("ui-widget-content ui-helper-hidden ui-state-active " + this.options.className);
return this._super();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment