I want to clear all input and textarea fields in a form. It works like the following when using an input button with the reset class:
$(\".reset
Why does it need to be done with any JavaScript at all?
http://www.w3.org/TR/html5/the-input-element.html#attr-input-type-keywords
Tried that one first, it won't clear fields with default values.
Here's a way to do it with jQuery, then:
$('.reset').on('click', function() {
$(this).closest('form').find('input[type=text], textarea').val('');
});