I currently have the following html:
Apologies for edit, I was not paying attention when i wrote this.
1&
-
$.each( $('.left'), function(i, left) {
$('div', left).each(function() {
});
})
讨论(0)
-
$(".left").children().each(function(i, elm) {
alert($(this).html())
});
讨论(0)
-
Is this what you're lookng for?
$('div.left>div').each(function(){ /* do stuff */ });
Fiddle:
http://jsfiddle.net/MLnBY/
讨论(0)
-
The syntax would be $(".left > div").each(function(){});
instead of .each(".left > div")
.
Update: Would want to use $(".left").children().each()
讨论(0)