imakewebthings / waypoints

Waypoints is a library that makes it easy to execute a function whenever you scroll to an element.
http://imakewebthings.com/waypoints/
10.38k stars 1.34k forks source link

Duplicate items on infinite scroll #316

Closed ryanscherler closed 9 years ago

ryanscherler commented 10 years ago

I am using the infinite scroll extension of waypoints and for some reason its loading duplicate content on each request. See example:

http://themazamastore.ryanscherler.com/goats-blahg/ (loads the first 9 items)

$('.content-grid').waypoint('infinite', { container: 'auto', items: '.post', more: '.MarkupPagerNavNext a' });

You can access the requested page(s) (next page of 9 items)

http://themazamastore.ryanscherler.com/goats-blahg/page-2

Any ideas why this would be happening? Am I supposed to somehow remove the elements already loaded? Maybe some sort of caching?

imakewebthings commented 9 years ago

@ryanscherler Apologies for not responding in any reasonable timeframe. I've been focusing on the 3.0.0 release. Is this bug still an issue? Nothing comes to mind immediately on why you would be seeing duplicate items. I see you've changed the site linked to use traditional navigation since this bug was opened.

imakewebthings commented 9 years ago

Reopen if this is still an issue. May want to try the newer 3.0 release and see if it helps as well.

pmkhoa commented 9 years ago

I was successfully replicated this issue in Google Chrome. If you open Chrome inspect element window, and keep scrolling on the browser window. I will load new items infinitely.

screenshot 2015-05-29 23 04 03

rawzone commented 9 years ago

I also have this issue on a Wordpress site where we are using the infinite scroll shortcut. When going back and forward and starting to scroll it seems like it keeps loading items after the "loop" should have ended..