Created
August 29, 2012 16:10
-
-
Save samuelcotterall/3514959 to your computer and use it in GitHub Desktop.
infinatescroll/masonry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).load(function () { | |
$('.posts').masonry(); | |
$('.masonryWrap').infinitescroll({ | |
debug: true, // Remove this before going live | |
navSelector : "div#navigation", // selector for the paged navigation (it will be hidden) | |
nextSelector : "div#navigation a#nextPage", // selector for the NEXT link (to page 2) | |
itemSelector : ".entry", // selector for all items you'll retrieve | |
bufferPx : 10000, | |
extraScrollPx : 11000, | |
loadingImg : "", // Removes "http://www.infinite-scroll.com/loading.gif" | |
loadingText : "", // Removes "Loading the next set of posts..." | |
donetext : "" // Removes "Congratulations, you've reached the end of the internet." | |
}, | |
function() { | |
console.log('Loaded new content'); // Remove this before going live | |
// call masonry as a callback. | |
$('.posts').masonry({ appendedContent: $(this) }); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment