can I select #id > #id with jQuery?
I’ve got this structure
<div id="slide1">
<div id="slide_body">
some content
</div>
</div>
<div id="slide2">
<div id="slide_body">
some content
</div>
</div>
Is there a way to select, using jquery, only the #slide_body inside #slide1?
Or is the only solution to append the id to each body div like
<div id="slide2">
<div id="slide_2_slide_body">
some content
</div>
</div>
You can’t use unique IDs in one document
http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
In your example you may use class “slide_body”
And then you can select it with
#slide1 .slide_bodyor$("#slide1").find('.slide_body')