pklauzinski / jscroll

An infinite scrolling plugin for jQuery.

Home Page:http://jscroll.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

documentation - detecting and destroying jscroll

opensourceame opened this issue · comments

I think it would be worth adding to the documentation, both in the README and on the jscroll.com website, how you can detect if jscroll is being applied and how to destroy it. This was important for me to know when to destroy the jscroll when switching from a scrolling tiles view to a list view. Something like this:

if ($('#content-container').data('jscroll') && view != 'tiles') {
  $('#content-container').jscroll.destroy();
}