I am using masonry with paul irish's infinite scroll but the infinite scroll wont kick in. I am developing a 'contained' tumblr theme.
I think it is something to do with it not reaching the bottom because if I open inspect element and the page squishes a bit vertically, and then scroll, infinite scrolling kicks it.
So is there a way to make the infinite scrolling trigger before the bottom of that page?
Here is the relevant code:
(function () {
var $tumblelog = $('#tumblrcontent');
$tumblelog.infinitescroll({
navSelector: ".pagination",
nextSelector: ".pagination a:last-child",
itemSelector: "article",
loading: {
finishedMsg: "<p> </p>",
img : "http://i58.tinypic.com/34huesh.gif",
msg: null,
msgText: "<p> </p>"
},
},
function (newElements) {
var $newElems = $(newElements).css({
opacity: 0
});
$newElems.imagesLoaded(function () {
$newElems.animate({
opacity: 1
});
$tumblelog.masonry('appended', $newElems);
});
});
$tumblelog.imagesLoaded(function () {
$tumblelog.masonry({
columnWidth: function (containerWidth) {
return containerWidth / 100;
}
});
});
})();