I am currently selecting all the input fields of a form using jQuery in the following way:
$('#new_user_form *').filter(':input').each(function(key, value) {
This works fine although it selects the submit input as well which I don’t want it to do.
Is there a simple way of making it ignore the submit button?
Thanks!
You can use
:not():Also, be careful with
:inputand other non-standard selectors. They don’t have the same speed benefit as native selectors on browsers that implementdocument.querySelectorAll.