Skip to content

Instantly share code, notes, and snippets.

@fael
Created September 29, 2011 13:20
Show Gist options
  • Save fael/1250715 to your computer and use it in GitHub Desktop.
Save fael/1250715 to your computer and use it in GitHub Desktop.
Exemplo de Plugin em jQuery
jQuery.fn.extend({
reset : function() {
return jQuery(this).filter('form').each(function() {
return this.reset();
}).end();
}
});
$('form').bind('submit', function(e) {
e.preventDefault();
//this.reset();
$('form, p').reset().css('background','red');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment