the onload event is not very reliable, maybe using the old way (I don't have IE6 to test it out:
(function($) { $.fn.pageOpening = function(path) { $("#loadingGal").show(); var imageObj = new Image(); $(imageObj).attr("src",path)[0].onload = function(){ $("#loadingGal").hide(); $("#leftCol").hide(); $("#leftCol").css("background- image","url("+path+")").fadeIn(1000); }; } $(document).ready(function() { $().pageOpening("images/photo-green-homes.jpg"); }); If that doesn't work, just skip the fade effect on IE6. Let it die ;) - ricardo On Sep 24, 12:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > no taker? > > On Sep 23, 12:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > Hi all. I'm working on a site where id like an image to fade in as > > the page shows up. The tricky part (i think) is that you can't trace > > the load of a background image. So ive made a new image dynamically > > and traced that, assuming that once the image is loaded there, i can > > insert it to the background, and remove the loading icon (#loadingGal) > > > code follows! > > > (function($) { > > $.fn.pageOpening = function(path) { > > $("#loadingGal").show(); > > var imageObj = new Image(); > > $(imageObj).attr("src",path).load(function(){ > > $("#loadingGal").hide(); > > $("#leftCol").hide(); > > > > $("#leftCol").css("background-image","url("+path+")").fadeIn(1000); > > }); > > } > > > $(document).ready(function() { > > $().pageOpening("images/photo-green-homes.jpg"); > > > }); > > > In IE6, the background image does not load and the loading div does > > not hide. On refresh however, all is fine. I feel this is a loading > > order issue with IE... or maybe cache. > > > any help is appreciated! > > > thanks.