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.
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
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
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
4 matches
Mail list logo