WordPress Infinite Scroll Selectors

The infinite-scroll plugin (infinite-scroll.com) used to work on my site, but somehow it no longer does. I’m not sure what changed.

My site is www.outgrow.me

Read More

The content selector I’m using is .li_container:first and post selector .mcol

Any ideas what happened?

Related posts

Leave a Reply

1 comment

  1. The Chrome console outputs the following error:

    Uncaught SyntaxError: Unexpected end of input http://outgrow.me/:1
    

    Look at the end of your document:

    <script type="text/javascript">
      mixpanel.track("Viewed Homepage",
        {"Title":"Homepage",
         "Date":"Friday",
    </script>
    

    There’s a missing closing bracket and parenthesis:

    });
    

    And, since date is the last item in your JSON object, it shouldn’t have a comma after it – this will cause problems in old versions of Internet Explorer.

    EDIT: So that fixed the JS error, but infinite scroll is still not working. I suspect the problem is that your .li_container div is not in the page’s source code.

    The plugin you’re using to create your columns (columnizer) inserts .li_container into the DOM, but does so AFTER the infinite scroll script runs, so infinite scroll has nothing to attach itself to. Place your columnizer scripts above the the infinite-scroll script, and I suspect that will fix the problem.