javascript - jquery each loop in a each loop -


i have divs use containers, want loop on them , loop on items in it.

so not $('.stackcontainer .stackitem').each( this:

// setup stacks $('.stackcontainer').each(function(containerindex) {     //console.log($(this));     console.log(containerindex);      $(this).('.stackitem').each(function(itemindex) {         console.log(itemindex);          } }); 

only working. how possible?

try

$('.stackcontainer').each(function(containerindex) {     //console.log($(this));     console.log(containerindex);      $(this).find('.stackitem').each(function(itemindex) {         console.log(itemindex);          } }); 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -