Loading large amount of (small) images

Loading large amount of (small) images

Hey all,

I'm working on a project that involves a page with a large amount of images (sometimes 400+). What's the best way to handle this? Should I track the loading-state of all of them, or is it save to assume I can do stuff as soon as the last image is loaded? So..

should I do something like this:
  1. $('img').load(function() { //do stuff };
(which is pretty heavy..)


or could I safely use something like this?
  1. $('#last_img').load(function() { //do stuff };

Thanks!