Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jquery-ias

webcreate171Dual-license2.3.1

A jQuery plugin that turns your server-side pagination into an infinite scrolling one using AJAX

scroll, scrolling, ajax, pagination, jquery, jquery-plugin, ias, infinite

readme

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.

changelog

Changelog

2.3.1

  • Fix: noneLeft event not being triggered when there was only one page

2.3.0

  • Added new option: initialize
  • Fix: ready event to fire when ready (see commit f6b44a7)
  • Added ajaxOptions to load event (PR by campadrenalin)

2.2.3

  • Improved documentation
  • Fix: Cannot read property 'Deferred' of undefined (in jQuery noConflict mode) (fixes #188, #271, #291)

2.2.2

  • Fix: render callback is not executed when using a custom render function (fixes #198)
  • Fix: unpredictable behaviour when multiple instances used the same selectors for sub-elements (fixes #93)
  • Stop ajax responder if instance was destroyed or reinitialized

2.2.1

  • Fix: prevent multiple initialisations causing duplicate items (fixes #175, #183)

2.2.0

  • Improved documentation on delay and negativeMargin options
  • Added FAQ to support documentation
  • Added Wordpress cookbook
  • Fix: Maintain history state object when changing pages (longzheng)
  • Fix: no longer caching $itemsContainer (fixes #153)
  • Fix: really destroy instance on destroy method (fixes #160)
  • Fix: Replaced deprecated size() with .length (fixes #162)
  • Fix: Reworked binding and unbinding (fixes various issues with unbinding)
  • Fix: Bail out when device doesn't support onScroll event (like Opera Mini) (fixes #146 by fflewddur)
  • Added reinitialize method

2.1.3

  • Bug #152 Improve compatibility support when Prototype is used along with jQuery (antoinekociuba)
  • Added docs

2.1.2

  • Added htmlPrev and textPrev options to IASTriggerExtension

2.1.1

  • Changed argument of load event from url to event object
  • Fixed prev() return value

2.1.0

  • Added History extension
  • Added ready event
  • Added loaded event (load is now triggered before loading starts)
  • Added rendered event (render is now triggered before rendering starts)
  • Added priority to callbacks
  • Added initialize call for extensions
  • Added one method

2.0.0

  • Completely rewritten
  • Extensible through extensions
  • Extensible through events
  • Added an extensive test suite