How can I fire an event when all images in the DOM are loaded? I\'ve googled a lot. I\'ve found this, but it doesn\'t seem to work:
jQuery event for images loaded
One issue I ran into with user113716's edited solution is that a broken image will keep the counter from ever reaching 0. This fixed it for me.
.error(function(){ imageLoaded(); $(this).hide(); });