I recieved alotta emails about this script so Ive decided to share it.
I have seen alot of people using this script but they go thru alotta crazy coding to make it work.
Anyways here it is.

Copy this code into the HEAD of your HTML document

<script language="JavaScript1.2">

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

</script>

In the BODY

And then you need add the following code in your image <img> tag.

style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)"

It should look like this.

<img src="ghostbone.gif" border=0 style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)">

Done. There you have it. Fading images. :)

 

 

Terms and Conditions
All rights reserved. Copyright © 2002 - 2003 ghostBone.com