I've seen this pattern used quite a bit, but it seems IE9 doesn't like it. Here is a rough idea of what my function does:
function(path){
$("<img/>",{"src":path}).one("load",function(event,alreadyLoaded) {
if(!alreadyLoaded) {
myObject.loadedImages = myObject.loadedImages || [];
myObject.loadedImages.push(this);
}
// Other code here...
}).each(function() {
if(this.complete) {
$(this).trigger("load",true);
}
});
}
I realize this might be a duplicate, but the suggestions I've seen aren't working: (e.g. this.readyState // returns uninitialized)
If someone could please point me in the right direction, that would be great. Thanks.