I am attempting to use the infinite scroll scripts located here:


I have followed this pretty much word for word, but it is not working and I am running out of time to get it to work. Below is my code:


    <div class="col" id="#blog-container">

        {if no_results}
            <div class="entry">
                <article style="min-height: 600px;">
                        <h1>No Results</h1>
                    Check back soon for more blog posts. 
            </div> <!-- /.entry -->
        <div class="entry">
                    <p class="meta">
                        <span class="category">{categories}{category_name}{/categories}</span> / <span class="date">{entry_date format="%F %d, %Y"}</span>
                    <h1><a href="{url_title_path='blog/details'}">{title}</a></h1>
                <img src="{blog_image}" alt="">
                {blog_excerpt}&nbsp; &nbsp; &nbsp; <a href="{url_title_path='blog/details'}" style="display: inline-block;">read more</a>
        </div> <!-- /.entry -->

        <p class="morePosts">
            {if next_page}<a href="{auto_path}" class="more" id="next">See More Posts</a>{/if}
    </div> <!-- /.col -->


    <script type="text/javascript" src="{site_url}assets/js/jquery.infinitescroll.js"></script>
    <script type="text/javascript">
                  navSelector : "p.morePosts",
                  nextSelector : "a.more",
                  itemSelector : ".entry",
                  contentSelector: "#blog-container",
                  extractLink: true // This is crucial if you want it work properly. Setting this to false or excluding it will not allow the script to work with EE


        // Unbind normal behavior

        // Bind normal behavior to the click function and prevent the browser from redirecting to the URL.
            return false;


I have used console.log at different parts of the js to see if the scripts are firing and I get a message for all the blocks above except for the click function on a#next. This seems to die.

Let me know if there are any other code items you need and thanks in advance for any help!

  • 4
    In your snippet you have <div class="col" id="#blog-container"> you should not have a # as part of a class or id try changing it to <div class="col" id="blog-container"> Jun 25, 2013 at 1:42

1 Answer 1


I had everything correct except the # in the ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.