[jQuery] Re: Impossible challenge: when bg image loads

2008-10-15 Thread Mauricio (Maujor) Samy Silva
Well done Eric. Your script tested here and do the job. Nice solution. I'd like to suggest the following: 1-) Set a time for the animation in order to see the image growing on the screen: animate({opacity:1}, 2000); 2-) Leave in place the image defined via CSS and hide it via script.

[jQuery] Re: Impossible challenge: when bg image loads

2008-10-15 Thread Eric Martin
Well, I'm not sure you can do it from CSS, but the following should work: var i = new Image(); i.src = "img/background.jpg"; // define the image you want to load here $(i).load(function () { $("").css({ opacity:0, position:"absolute", // use as needed

[jQuery] Re: Impossible challenge: when bg image loads

2008-10-15 Thread gjhames
in www.gewton.com, when the background loads, fade in. Just that. The problem is: the background is defined in css. Is not an image tag. And souldn't be. On Oct 12, 3:40 pm, Eric <[EMAIL PROTECTED]> wrote: > I'm gonna go out on a limb and say, "no". > > But you might be able to work with the bro

[jQuery] Re: Impossible challenge: when bg image loads

2008-10-12 Thread Eric
I'm gonna go out on a limb and say, "no". But you might be able to work with the browser cache by loading the bg.jpg in a hidden div. If that causes the image to be cached by the browser, then you can show the background after a significant delay and it *should* appear instantaneously. Not tes