More information about the Underscore mailing list

[_] jquery - stop images loading for photo gallery

Jean-Paul Gorman jean-paul_ at madeupdesign.com
Tue Feb 22 12:57:53 GMT 2011

Instead of no tags you could get your jQuery gallery to remove the images that you don't want to load from the DOM in the document.ready state... assuming you're using jQuery. For each image that you remove from the DOM you could then populate an object variable array

e.g. var images = {
	imagestoLoadAjax : []
}

$('#some-container img').each(function(){

	images. imagestoLoadAjax.push($(this).attr('src'));

	$(this).remove();

});

or something a like maybe 

JP