Support » Plugin: WordPress Infinite Scroll - Ajax Load More » Ajax Load More and Pace js

  • Resolved creativemanner

    (@creativemanner)


    Hey David, I ve been trying to get pace.js to work with your plugin but so far no luck. I am sure you know the pace.js.(http://github.hubspot.com/pace/)
    On the site I am working on, the pace trigers again after the alm finishes. I tried disabling the pace by adding `window.paceOptions = {
    ajax: false, // disabled`
    but that didnt seem to work. is there a way to get these both work?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dcooney

    (@dcooney)

    Hi @creativemanner,
    I’d suggest use the almDone() callback function to disable pace once all posts have been loaded.

    Cheers,

    Hi David, I tried that but no luck, here is the page I am talking about http://pcicreative.com/blog/ . You ll see the white background and loading on red progress bar top going twice on initial land. also, it does on each time when you click load more. any help would be great man.

    Thanks, love your work

    Plugin Author dcooney

    (@dcooney)

    Thanks for sharing the link. That helps.
    Ok, so its looking like Pace goes through it’s loading routine every time there is a Ajax trigger happening. So for the initial load you will probably want to set pause="true" pause_override="true" so Ajax doesn’t trigger on page load.

    If you did that I’d recommend the Preloaded Add-on to load some posts on page load.

    I notice you are using the SEO addon, but it’t not working correctly, it doesn’t appear to be anyways.

    Thanks for the tip, now nothing loads on initial load and when I click load more, it trigers the pace again. 🙁

    This did the trick 🙂

    <script>
    window.paceOptions = {
        ajax: false,
         restartOnPushState: false
    };
    </script>
    Plugin Author dcooney

    (@dcooney)

    Nice work!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ajax Load More and Pace js’ is closed to new replies.