Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Destroy the Widget
(function ($) {
$.widget("custom.clicker", {
// the rest of the clicker is omitted
destroy: function () {
this.element.text("");
// Call the base destroy function.
$.Widget.prototype.destroy.call(this);
}
});
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment