This is more above the scope of elastica template, but I’ll still post here just in case.
Is it possible to use infinte scroll using Joomla’s and K2’s pagination? I’m trying, but so far I haven’t got it. This is the example from Jquery Masonry site dcoumentation.
I changed $ to jQuery here for Joomla.
jQuerycontainer.infinitescroll({
navSelector : '.pagenav', // selector for the paged navigation
nextSelector : '.pagenav a', // selector for the NEXT link (to page 2)
itemSelector : '.box', // selector for all items you'll retrieve
loading: {
finishedMsg: 'No more pages to load.',
img: 'http://i.imgur.com/6RMhx.gif'
}
},
// trigger Masonry as a callback
function( newElements ) {
// hide new items while they are loading
var jQuerynewElems = jQuery( newElements ).css({ opacity: 0 });
// ensure that images load before adding to masonry layout
jQuerynewElems.imagesLoaded(function(){
// show elems now they're ready
jQuerynewElems.animate({ opacity: 1 });
jQuerycontainer.masonry( 'appended', jQuerynewElems, true );
});
}
);
});
what I can’t get right is the selectors
navSelector : '#page-nav', // selector for the paged navigation
nextSelector : '#page-nav a', // selector for the NEXT link (to page 2)