Answers.Body: <p>To produce an &quot;infinite scroll&quot; like behavior, you'll need to go further than just pagination with TWIG. You'll need to implement some JavaScript. Metafizzy's <a href="https://github.com/metafizzy/infinite-scroll" rel="nofollow noreferrer">Infinite Scroll</a> might be appropriate.</p>
  <p>This question has answers that could help you: <a href="https://craftcms.stackexchange.com/questions/2842/infinite-scrolling-with-craft/6621">Infinite scrolling with Craft?</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-07T21:33:47.930Z
Answers.LastActivityDate: 2021-04-07T21:33:47.930Z
Answers.UserDisplayName: John
Body: <p>I'm not good in programming and I stuck on making infinite scroll on my website.</p>
  <p>Right now I have the code for pagination that looks like this:</p>
  <pre><code>    {% set query = craft.entries()
      .section('articles')
      .type('naujienos')
      .limit(15)
       %}
  
  {% paginate query as pageInfo, pageEntries %}
  
  {% for entry in pageEntries %}
     {% include 'blocks/_article-with-text.three'  %}
  {% endfor %}
  
  &lt;/div&gt;
  
  {% if pageInfo.prevUrl %}&lt;a href=&quot;{{ pageInfo.prevUrl }}&quot;&gt;Previous Page&lt;/a&gt;{% endif %}
  {% if pageInfo.nextUrl %}&lt;a href=&quot;{{ pageInfo.nextUrl }}&quot;&gt;Next Page&lt;/a&gt;{% endif %}
  </code></pre>
  <p>It's very much the same as in Craft CMS documentation and I checked all the topics that are in here but couldn't make it work for me. Maybe someone can help me out please?</p>
  
Tags: <pagination>
Title: Inifinite scroll
ThreadText: # Inifinite scroll
  
  (Asked by: username_0 on 2021-04-06)
  
  I'm not good in programming and I stuck on making infinite scroll on my website.
  
  Right now I have the code for pagination that looks like this:
  
  ```
      {% set query = craft.entries()
      .section('articles')
      .type('naujienos')
      .limit(15)
       %}
  
  {% paginate query as pageInfo, pageEntries %}
  
  {% for entry in pageEntries %}
     {% include 'blocks/_article-with-text.three'  %}
  {% endfor %}
  
  </div>
  
  {% if pageInfo.prevUrl %}<a href="{{ pageInfo.prevUrl }}">Previous Page</a>{% endif %}
  {% if pageInfo.nextUrl %}<a href="{{ pageInfo.nextUrl }}">Next Page</a>{% endif %}
  
  ```
  
  It's very much the same as in Craft CMS documentation and I checked all the topics that are in here but couldn't make it work for me. Maybe someone can help me out please?
  
  **Tags:** pagination
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-04-07. Score: 1
  
  To produce an "infinite scroll" like behavior, you'll need to go further than just pagination with TWIG. You'll need to implement some JavaScript. Metafizzy's [Infinite Scroll](https://github.com/metafizzy/infinite-scroll) might be appropriate.
  
  This question has answers that could help you: [Infinite scrolling with Craft?](https://craftcms.stackexchange.com/questions/2842/infinite-scrolling-with-craft/6621)
  
  
  ---
  
  