I am trying to get jquery-ias working with masonry and I cannot get it working.
I am using a mysql database and php to load images.
I have almost got it all working correctly, after a lot of trial and error.
I am able to get all my images loading correctly into a masonry grid.
I can get infinite scroll working too.
My problem is I can't get the loading gif to work or the 'load more items' button to appear.
The code I am using is
<script type="text/javascript">
var $container = $('.wrap');
$container.imagesLoaded(function() {
$container.masonry({
itemSelector: '.item',
isFitWidth: false,
isAnimated: true
})
});
$.ias({
container: '.wrap',
item: '.item',
pagination: '.nav',
next: '.nav a',
loader: '<img src="css/ajax-loader.gif"/>', // loading gif
triggerPageThreshold: 5 ,
onLoadItems: function(items) {
var $newElems = jQuery(items).css({ opacity: 0 });
$newElems.imagesLoaded(function() {
// show elems now they're ready
$newElems.animate({ opacity: 1 });
$container.masonry('appended', $newElems, true);
});
return true;
},
});
</script>
Any help would be great
Everything works well, just cant see the loading gif or the load more items button, which is really needed