Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2015 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0b19b7336bbced5157b3 to your computer and use it in GitHub Desktop.
Save anonymous/0b19b7336bbced5157b3 to your computer and use it in GitHub Desktop.
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script>
<script type="text/javascript">
$('.gallery').infinitescroll({
navSelector : "ul.pagination",
nextSelector : "ul.pagination a:first",
itemSelector : ".gallery",
debug : false,
dataType : 'html',
path: function(index) {
return "?page=" + index;
}
}, function(newElements, data, url){
var displayImage = $('img.display-image');
displayImage.lazyload({threshold: 200});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment