pklauzinski / jscroll

An infinite scrolling plugin for jQuery.
http://jscroll.com/
1.11k stars 563 forks source link

Removing content from main div prevent jScroll from triggering (no scroll) #137

Closed bigretromike closed 7 years ago

bigretromike commented 7 years ago

I have page that list div objects (containing text,pic,buttons) in list way. when I scroll down jScroll trigger and populate list with more content - but when I remove those divs with clicking each button on them the jscroll dosn't trigger because i don't scroll page.

I wanted to exposed _load() but it would trigger each time I click button so it would load to many pages ahead which is bad idea.

Is there a way to trigger jscroll somehow other than scroll down (at the end there is no scroll bar because main div have non or one div with content)

pklauzinski commented 7 years ago

Yes, you can set the autoTrigger option to false which will instead use the nextSelector link's click event to trigger the loading of the next set of content.

See Example 2 on jscroll.com for a demo of this.

bigretromike commented 7 years ago

That dont resolve my issue, i would like to stick with autotrigget=true. I would have to detect page height and then manipulat autotrigger to off but would that evem work?

On July 21, 2017 5:27:53 PM GMT+02:00, Philip Klauzinski notifications@github.com wrote:

Yes, you can set the autoTrigger option to false which will instead use the nextSelector link's click event to trigger the loading of the next set of content.

See Example 2 on jscroll.com for a demo of this.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/pklauzinski/jscroll/issues/137#issuecomment-317031871