I’m having trouble doing a simple iterate through divs of a particular class.
There’s two divs, but I’m getting 14 iterations.
$(function() {
$.each("div.container", function(){
alert( "test" );
});
});
and the html
<div id="div1" class="container">
</div>
<div id="div2" class="container">
</div>
can anyone explain what i’m doing wrong? Thanks ahead
try this