22.10.2010
function clear_form_elements(form) { $(form).find(':input').each(function() { switch(this.type) { case 'password': case 'select-multiple': case 'select-one': case 'text': case 'hidden': case 'textarea': $(this).val(''); break; case 'checkbox': case 'radio': this.checked = false; } }); } //Credit: http://www.electrictoolbox.com/jquery-clear-form///