{Solved}:How can u add for example advertisements after 10
Posted: Mon Apr 30, 2012 4:27 pm
How can u add for example advertisements after 10 divs in jquery?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$('.div1').each(function(i,e){
if (((i+1) % 3) == 0)
$(this).after('<div class="div4"><p style="line-height:3px;">دعاية هنا</p></div>');
});Code: Select all
var advertisement = a jquery object representing the advertisement
$("div:eq(9)").after(advertisement);