Topic: Infinite Scroll Buggy (?)

Andrew Ford priority asked 1 year ago


I'm not 100% certain about this, but I think the full-page infinite scroll example is buggy. By default, it loads 6 images, and the 'load-more' doesn't get triggered when I scroll to the bottom of the page every time.


Also, I think I am not understanding how to set it up. I made a snippet of the skeleton markup, Infinite Scroll snippet

I figure I need to bind the event to the window, but then I need to load new posts from the database at the bottom of the div#newsfeed element.


Kamila Pieńkowska staff answered 1 year ago


The example in the documentation works fine. New posts won't add all the time. 8 posts are the limit because that amount is defined in JS.

In your snippet, you left functions that are not included in the snippet and you fetch PHP that was not included so I don't know how it is supposed to work.

I prepared a simplified snippet for you. https://mdbootstrap.com/snippets/standard/kpienkowska/4918522

The creation of the post is hardcoded there and can be replaced with some function and include fetch.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.1.0
  • Device: N/A
  • Browser: N/A
  • OS: N/A
  • Provided sample code: Yes
  • Provided link: Yes