re,
I have a simple query that works:
$("#test > fieldset > input").each(function() { })
However, I want to select “input” and “select” elements without having to write 2 “each” queries. Is this possible?
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
jQuery provides some nice extensibility features. Here’s a generic filter to select by multiple tag names:
It has a performance hit in that the callback function will be called for each element matching upto the point of the filter, so I wouldn’t recommended this for very large documents.