Inforian
Inforian

Reputation: 1736

Django Endless pagination

I am using Django-endless pagination module.I have installed it using pip and define all necessary code in setting and templates.

It works fine but the pagination right now working is divide the number of posts in no. of pages like if I have total 10 posts then it will divide it in to 3 post per page , thus at the end of page it shows total no. pages which is 4.

But I do not want pagination in this way , I want On scroll pagination , means when ever user scroll down the page next posts are loaded via ajax.

Code:

{% scroll_paginate posts %}
   <code to display posts>
{% show_pages %}

Upvotes: 0

Views: 501

Answers (1)

Deep
Deep

Reputation: 3076

Have you included the relevant javascript?

                <script>
            $.endlessPaginate({
                paginateOnScroll: true,
                paginateOnScrollChunkSize: 3
            });             
            </script>

Upvotes: 1

Related Questions