With img elements you can check the complete attribute. Is there an easy way to do something similar with a div?
I'm not exactly clear on what you are trying to do, but is there some reason the general domelement load event won't work for whatever it is?
If you really want to do it as a check, you could just set a variable in the load event and then check that variable.
Correct me if I'm wrong, but doesn't the onload event fire only once when the page is first loaded? For what I'm doing, an ajax call is changing the sources of background images of a few divs. Some of these images are quite large. I need to know when the new images brought in by the ajax call finish loading.
In any reasonably modern browser, you can put a load event on any element, and it fires when that element finished loading.
You could just say <div onload=" function(); "> or if you want to add events from javascript something like http://snipplr.com/view/3116/cross-browser-add-event-listener/
<div id='myDiv' onload='myCallback()' style="background-image : url('foo') />
jQuery("#myDiv").css("background-image", "url('bar')");