ltrem Posted November 27, 2009 Share Posted November 27, 2009 Hey guys, <td id=”test”> <div>blabla</div> <div class=”ulError” style=”margin: 0px 0px 0px 0px;”></div> </td> I want to access to the second div in jQuery... but I also want to access it from the TD #test. I tried different thing like : $(’#test:eq(1)’).......... didn’t worked. $(’#test > .ulError’)........ didn’t worked. I need to get to the .ulError by the #test because I have a #test2 that is exactly the same... so I can't just call the .ulError straight... Would this work? $('#test').children('div .ulError') Thanks for your time! Quote Link to comment Share on other sites More sharing options...
JustLikeIcarus Posted November 27, 2009 Share Posted November 27, 2009 You could do $('#test .ulError'). or $('#test').find('.ulError') Both should return the element you want. Quote Link to comment Share on other sites More sharing options...
ltrem Posted November 27, 2009 Author Share Posted November 27, 2009 $('#test .ulError'). This worked fine! Thanks... can't believe I didn't try it before asking here.. lol thanks mate! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.