CMS load — Next button is refreshing the page

Hi there

First of all, thanks for reading this.
I have a review section on the mobile version of this link:

It is a bit down on the screen.

I implemented the CMS load more attribute, and I swear it used to work perfectly a while back.
But for some reason, it now refreshes the page when clicking the ‘load more’ button
I looked for over an hour, but cannot find the issue.
Any help would be appreciated.


Kind regards

Hey @phil1! You’ve misplaced the load mode attribute, it should go with the fs-cmsload-element='list', not on the button itself :wink:

Hi Luis

Thanks for your reply.

Unfortunately still no luck.
Both attributes are now on the collection list.
Still refreshing after clicking the ‘load more’ button.


Hey @phil1! I found the source of the issue, you have added a snippet of custom code to handle link clicks

      // Code that runs on click of a link
      $(document).ready(function () {
        $('a').on('click', function (e) {
          console.log('button clicked');
          if (
            $(this).prop('hostname') === &&
            $(this).attr('href').indexOf('#') === -1 &&
            $(this).attr('target') !== '_blank'
          ) {
            let destination = $(this).attr('href');
  '.page-wrapper', {
              opacity: 0,
              duration: 0.8,
              ease: 'power3.out',
              onComplete: () => {
                window.location = destination;

        // On click of the back button
        window.onpageshow = function (event) {
          if (event.persisted) {

This is refreshing the page after the “Load more” button is clicked. Commenting it out loads the items as expected.

Wooooow absolutely right.
Thanks a lot for this. Really appreciate it.

1 Like