I have the following markup:
<div id="items">
<div class="item">
<div class="item_box" id="id_1">
<div class="one" id="one"></div>
</div>
</div>
<div class="item">
<div class="item_box" id="id_2">
<div class="one" id="two"></div>
</div>
</div>
<div class="item">
<div class="item_box" id="id_3">
<div class="one" id="three"></div>
</div>
</div>
</div>
Basically, I want to be able to loop through and get the id value in the item_box class.
Here's the code I'm trying to use:
$('#items').find(/[id_]/).each(
function(){
alert($(this).attr('id'));
});
This doesn't work though... I've tried using .children, however that won't go as deep as these are nested.
Any ideas?
Thanks!