{Solved}:How can u add for example advertisements after 10
Moderator: General Moderators
{Solved}:How can u add for example advertisements after 10
How can u add for example advertisements after 10 divs in jquery?
Last edited by mekha on Wed May 02, 2012 7:15 am, edited 1 time in total.
Re: How can u add for example advertisements after 10 divs i
i added this:
but the slideToggle in the div before this code .after ... doesnt work :\
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>');
});Re: How can u add for example advertisements after 10 divs i
Not a lot of details, so I'm going to assume you simply have 10 divs on a page.
Code: Select all
var advertisement = a jquery object representing the advertisement
$("div:eq(9)").after(advertisement);Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: How can u add for example advertisements after 10 divs i
thank you
))))))