Jquery - fadeIn after image is loaded, not working in IE

I’m trying to fade a large background image in after it’s loaded, here’s the JS:



//the image is contained in a div with the id of "stage"

$(document).ready(function() {

    $('#stage img').hide();
    
    $('#stage img').load(function() {
        $(this).fadeIn(5000);
    });
    
});



This works fine in Firefox/Chrome but not in IE8 (I haven’t tried the older versions yet).

Any idea what I’m doing wrong?

Cheers,

Jon

This is also described in the API page for .load

As that page describes, the solution is to get the event.special.load plugin.

PS. That it doesn’t happen for you now, doesn’t mean it will never happen. IE and .load() are not good friends …

Don’t worry, I was using the page on my machine, not on a server. Now I’ve uploaded it it seems to be working.

Cheers,

Jon