lundi 22 août 2016

JavaScript showing active div when scroll the page

I searched almost everywhere but I couldn't find it. I have a feed like facebook or instagram. I put the advirtesment div after every 5 posts like other posts(like on instagram). The problem is that when I scroll the page if scroll position is at the advirtesment div I want to add a class like in-view with js. How can I do that? By the way, I load other posts when scroll is bottom of page. Thank you in advance

Aucun commentaire:

Enregistrer un commentaire