Just use an attribute selector. For example: $('input[name=firstName]')
http://docs.jquery.com/Selectors/attributeEquals#attributevalue --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 26, 2009, at 10:04 AM, Flavouski wrote:
In JQuery I saw you can get attributes by saying foo.attr("value"), super handy. Is there anyway to get the element of the thing that contains the attribute? Reasoning: I've got a few hidden inputs that have name="firstName" value="Bob" name="lastName" value="Bobble" So I would want to say get the element whose attr "name" equals "firstName". So then I can go back into the element and retrieve the value associated with it: "Bob" Thanks