Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 2.47 KB

README.md

File metadata and controls

82 lines (59 loc) · 2.47 KB

Infinite Ajax Scroll

Infinite Ajax Scroll

Turn your existing pagination into infinite scrolling pages with ease.

  • SEO friendly 🥇
  • Doesn't break browsers back button 💯
  • Highly customizable through extensions ✨

More features, docs and demos available at: https://infiniteajaxscroll.com/

Build Status Gitter chat

Installation

Download jquery-ias.min.js (latest).

Include Infinite Ajax Scroll into your html pages.

<script src="jquery-ias.min.js"></script>

Include jQuery if you haven't already.

<script   
    src="https://code.jquery.com/jquery-3.2.1.min.js"   
    integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="   
    crossorigin="anonymous"></script>

Usage

Infinite Ajax Scroll requires markup similar to this:

<div id="container">
  <div class="post">...</div>
  <div class="post">...</div>
</div>

<div id="pagination">
  <a href="/page1/" class="prev">prev</a>
  <a href="/page3/" class="next">next</a>
</div>

Then configure Infinite Ajax Scroll:

<script type="text/javascript">
  var ias = jQuery.ias({
    container:  '#container',
    item:       '.post',
    pagination: '#pagination',
    next:       '#pagination a.next'
  });

  ias.extension(new IASSpinnerExtension());
  ias.extension(new IASTriggerExtension({offset: 2}));
  ias.extension(new IASNoneLeftExtension({text: "You reached the end"}));
  ias.extension(new IASPagingExtension());
  ias.extension(new IASHistoryExtension({prev: '#pagination a.prev'}));
</script>

For complete documentation about options and extensions visit https://infiniteajaxscroll.com/docs/.

Licensing

Infinite Ajax Scroll may be used in commercial projects and applications with the one-time purchase of a commercial license.

https://infiniteajaxscroll.com/docs/license.html

For non-commercial, personal, or open source projects and applications, you may use Infinite Ajax Scroll under the terms of the MIT License. You may use Infinite AJAX Scroll for free.