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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -