metafizzy / infinite-scroll

📜 Automatically add next page
https://infinite-scroll.com
7.41k stars 1.74k forks source link

It keeps on incrementing page number #683

Closed fateemah closed 7 years ago

fateemah commented 7 years ago
       $('.hadith').infiniteScroll({
                // options
                path: '.pagination a',
                append: '.articles',
                loadOnScroll: true,                 
        });
<p class="pagination">
        <strong>1</strong>
        <a href="http://ahadith.ws/bukhari/book/5" data-ci-pagination-page="2">2</a>
</p>

while scrolling, it keeps on incrementing last number /book/6, /book/7 .....

imfaisalkh commented 7 years ago

Are you using WordPress? If so make sure that WordPress is returning 404 error for any subsequent pages which do not have any articles.

fateemah commented 7 years ago

No, I'm using codeigniter

desandro commented 7 years ago

Thank you for reporting this issue. I'm sorry to see you're having trouble with Infinite Scroll. Could you provide a live URL, or even better a reduced test case? See Submitting Issues in the contributing guidelines.

fateemah commented 7 years ago

i'm using Codeigniter framework. Cant post reduced test case for it I've created simple CI files to test it, but it is not working for Codeigniter, this was error of infinte-scroll: TypeError: this.getPath is not a function