user2613813
user2613813

Reputation: 1971

infinite scroll hide first elements

I'm using a infinite scroll and I would like hide content (50 first div elements) when user loaded 300 elements...

Example : user is currently on 250 - 290 element with scroll My goal : hide 0 - 50 element part

I tried to understand this algo from Mutahhir but there is a lack of code.

Performance with infinite scroll or a lot of dom elements?

Thx

Upvotes: 0

Views: 1251

Answers (1)

Maurizio In denmark
Maurizio In denmark

Reputation: 4284

Try this css on your elements:

.yourelement:nth-child(-n+50){
    display:none;
}

I think you can set the .yourelement name in the itemSelector property of the plugin.

Upvotes: 1

Related Questions