zomgistania

Main page | About | Articles | Previous Posts | Archives

Monday, April 03, 2006

Fading imagery

Last night while trying to fall asleep, an idea just popped into my head: A image fader made with JavaScript...

so...

Image fader

Tested to work with IE, Safari,Opera 9 and Firefox. Yes, the images are blatantly stolen from around the web. Shoot me.

and wtf? Opera 8 doesn't support opacity? Damn... Well, at least it rotates the images...



The idea behind the script is relatively simple, but there was a small problem with IE implementation...

Basically what you do is make a structure like <div><img></div>, where the div will contain the image to fade to and the img will contain the image in fading.
Fading is done by reducing the CSS opacity value or filter: alpha(opacity=something) value in IE


Feel free to study the code or use it for something if you find it useful... a comment or link back here would be nice if you do tho.

With a little work, one could easily convert that into a banner rotator with changing links when images change.

0 Comments:

Post a Comment

<< Home