Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    OK, so input[name=user] works fine for finding elements of a specific name. Now how do I do that within a div, again?

  • #3
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Nevermind. I'm a dope. JQuery rules... $("#div_id > input[name=whatever]"). I love selectors.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •