I was trying to use spinner images while the image is loading, and then I saw this thread:
How to show a spinner while loading an image via JavaScript
I did quite some search but I still don't quite understand in the accepted answer why put objImagePreloader.onload=function(){};
in another onload
function or how exactly it works. Could someone explain to me? It might be obvious but I am rather new to web design and any help will be very much appreciated.
Thanks, YL