0

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

Community
  • 1
  • 1
user2613813
  • 1,951
  • 2
  • 13
  • 10

1 Answers1

1

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.

Maurizio In denmark
  • 4,226
  • 2
  • 30
  • 64