Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-23-2009, 12:10 AM   PM User | #1
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
Selector with child/name

2 simple jquery questions i seem to be having a problem with...

I need to simply retrieve the child element of a div of a specified element name. What I quickly realized was I couldn't even construct the approriate selector to get any element by name. I read that $('[@name=foo]') was the way, but it didn't work for me.

If someone could tell me the selector for $("#id_of_div").child-where-name=foo, I would be grateful. I'm sure the answer is simple, which are the exact things my brain is having problems with these days.

Thank You.
snoodle is offline   Reply With Quote
Old 04-23-2009, 12:42 AM   PM User | #2
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
OK, so input[name=user] works fine for finding elements of a specific name. Now how do I do that within a div, again?
snoodle is offline   Reply With Quote
Old 04-23-2009, 02:52 AM   PM User | #3
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
Nevermind. I'm a dope. JQuery rules... $("#div_id > input[name=whatever]"). I love selectors.
snoodle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:08 AM.


Advertisement
Log in to turn off these ads.