At the minute I have a button which is allowing me to display more images when you press "show more" button:
$(function(){
$("#gallery li").slice(0, 10).show();
$("#loadMore").click(function(e){
e.preventDefault();
$("#gallery li:hidden").slice(0, 10).show();
if($("#gallery li:hidden").length == 0){
alert("No more images");
}
});
});
it's working fine, however all the images are loaded when you first enter the website. I'm wondering if there is a way of not preloading all images, but only 10 displayed and when someone press on "show more" that's when more images will actually be loaded not shown ?
Thanks