Skip to content

A YUI Plugin for Squarespace blogs to add Infinite Scrolling functionality to Blog pages

Notifications You must be signed in to change notification settings

brianjcarroll/infinitescroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

infinitescroll

A YUI Plugin for Squarespace blogs to add Infinite Scrolling functionality to Blog pages

##api

new Y.Squarespace.InfiniteScroll({
  contentWrapper: null,           // the wrapper to append new blog items to (default is #blogWrapper)
  ajaxClass: null,                // adds a class to the items fetched by ajax (default is .ajax-items)
  newerPostsLink: null,           // the link to grab the next URL of items (default is #newer)
  olderPostsLink: null,           // the link to grab the previous URL of items (default is #older)
  queryString: null,              // the query string to attach to the ajax request (default is &format=main-content)
  loadingAnimationClass: null,    // Include this if you want a loading animation (default is .pulses)
  ajaxDelay: null,                // Include a delay time for ajax, in seconds (default is 0, one second is 1)
  loadOnClick: null               // Default behavior is ajax request on scroll to bottom, set this to true to include a load more button instead
});

##how to use it

  • Copy or download infinitescroll.js and add it to your /scripts folder in Developer Mode
  • include 'infinite-scroll' in the list of dependencies for YUI (usually found in scripts/site.js). Example:
  YUI().use('infinite-scroll', function(Y){
    Y.on('domready', function() {
      new Y.Squarespace.InfiniteScroll({
        // your configuration options here
      });
    });
  });
  • You're good to go!

About

A YUI Plugin for Squarespace blogs to add Infinite Scrolling functionality to Blog pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published