Skip to content

Instantly share code, notes, and snippets.

@MarkVaughn
Forked from dantoncancella/gist:4564386
Last active December 13, 2015 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkVaughn/4975405 to your computer and use it in GitHub Desktop.
Save MarkVaughn/4975405 to your computer and use it in GitHub Desktop.
Chaining reset function for jQuery, pass a function to bind on the reset event.
(function($){
$.fn.reset = function(fn) {
return fn ? this.bind("reset", fn) : this.trigger("reset");
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment