Following is my html code.
<div class="panels" id="panels">
<div class = 'panel' id = 'panel1' title = 'Learners Status' ></div>
<div class = 'panel' id = 'panel2' title = 'ILR Status' ></div>
<div class = 'panel' id = 'panel3' title = 'Test Graph' ></div>
</div>
I want to get all panel divs inside the 'panels' div.
Following code is not working for me.
var children = $("div.panels").children('div');
alert(children.length);
It may be that your code is not at the bottom of the page, in which case you have to explicitly require the code to wait for
DOM ready
event: