views:

148

answers:

3

How would you fade in a background image (the body tag, and it is tiled) with jQuery? The background color is white and in a callback function I want to toggle the background image to on and off.

Any ideas?

A: 

Using jQuery for Background Image Animations

Josh Stodola
That looks great. Trying it out now. Will comment in a bit.
mistero
A: 

Unfortunately you can't really fade in a tiled background image. Since the image is part of the CSS rendering system it doesn't have a node in the DOM.

You can do some fancy stuff by using a frame type animation by moving the position of the background image but this wouldn't work with:

A. a whole body background
B. a tiled image.
joshperry
+1  A: 

Take a look here, one of the first google results by the way.

Soufiane Hassou
I can't find a reference to backgroundImage. Only backgroundColor...
mistero
hmm, I just found this: http://groups.google.com/group/jquery-en/browse_thread/thread/ca6d74bba95d15f4, hope it'll help.
Soufiane Hassou
well i caved and only using a background color. the image was a subtle grain anyways so it's no biggie ;)!
mistero