Skip to content

Instantly share code, notes, and snippets.

@johnbuck
Created September 30, 2014 18:05
Show Gist options
  • Save johnbuck/baec5a294c2d340c9f87 to your computer and use it in GitHub Desktop.
Save johnbuck/baec5a294c2d340c9f87 to your computer and use it in GitHub Desktop.
$container.infinitescroll({
navSelector : '.nav-previous', // selector for the paged navigation
nextSelector : '.nav-previous a', // selector for the NEXT link (to page 2)
itemSelector : '.item', // selector for all items you'll retrieve
loading: {
finishedMsg: 'No more pages to load.',
img: 'http://i.imgur.com/qkKy8.gif'
}
},
// call Isotope as a callback
function(newElements) {
var $newElems = $(newElements);
$newElems.imagesLoaded(function(){
$container.isotope('appended', $newElems );
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment