Topic: Best Replacement for <body onload="gallery()">
Morning,
Currently I have <body onload="gallery()"> firing the script. It's for a photo gallery which will have 60 plus fairly large photos. The script is running along side jQuery. I am looking for the fastest onload event. Because I don't want to wait until all 60 photos are loaded before it fires.
So far I've pieced together these three alternatives. Which is "best/fastest", or can you suggest a even better/faster way? Thanks!
window.onload=gallery;
window.onload = function(){
gallery();
}
$(document).ready(function(){
gallery();
});Last edited by Eric (June 12, 2009 9:49 am)

