Jquery .each through Divs inside another Div

社会主义新天地 提交于 2019-12-01 03:39:31
$.each( $('.left'), function(i, left) {
   $('div', left).each(function() {

   });
})

Is this what you're lookng for?

$('div.left>div').each(function(){ /* do stuff */ });

Fiddle: http://jsfiddle.net/MLnBY/

$(".left").children().each(function(i, elm) {
    alert($(this).html())
});

The syntax would be $(".left > div").each(function(){}); instead of .each(".left > div").

Update: Would want to use $(".left").children().each()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!