I’m loading HTML from an AJAX request, and some img tags in it.
I need to know when the images loaded in the AJAX are fully loaded to resize the container.
I don’t know how many images are in the result, so I can’t simply check the .complete value.
Do you know a solution for this?
If you’re using jQuery, the
$(window).load()command can set up a function to be called once all the images are loaded, as follows:If you’re not using jQuery, I’d just do what I’ve done when I want a little bit of its functionality: download it and examine the source to see how it does it. Then do that 🙂