[jQuery] .reset() methods for forms

[jQuery] .reset() methods for forms


Hello there.
As I mentioned in my comment at
http://www.learningjquery.com/2007/08/clearing-form-data#comment-9943
I think it would be useful to have a reset method in the core, along
the lines of:
$.fn.extend({ reset: function() {
return this.each(function() {
$(this).is('form') && this.reset();
}
} });
For a small amount of extra code in the core, people could then reset
their forms and carry on the chain ala. $('form').foo().reset().bar().
--
Best wishes,
Dave Cardwell
http://davecardwell.co.uk/javascript/jquery/