.marc
New member
einfach mal testen würde mich interessieren ab welchen Browserversionen [IE/NS] es funtioniert. Im NS gibts derzeit noch einen Fehler weiss aber noch nicht genau warum
hier mal der Code:
weis jemand ob es im Opera auch irgend so eine Eigenschaft gibt?
hier mal der Code:
Code:
<html>
<head>
<script type="text/javascript" language="JavaScript">
/*-----------------------------------------------------+
| author: marc tanner |
+----------------------[Options]----------------------*/
speed=50; // wert in Millisekunden
stepIE=10; // differenz von Schritt zu Schritt [IE]
stepNS=0.1; // differenz von Schritt zu Schritt [NS]
// wert zwischen 0.9 und 0.1
/*---------------------[/Options]---------------------*/
fadeObjects = new Array();
fadeInTimers = new Array();
fadeOutTimers = new Array();
function fadeIn(object,filterMS,optionsNS)
{
fadeObjects[object.id] = object;
if(fadeOutTimers[object.id]!=undefined)
{
window.clearTimeout(fadeOutTimers[object.id]);
}
if(object.style.MozOpacity)
{
if(object.style.MozOpacity>optionsNS)
{
object.style.MozOpacity-=stepNS;
fadeInTimers[object.id] = window.setTimeout("fadeIn(fadeObjects["+object.id+"], "+filterMS+", "+optionsNS+")", speed);
}
else
{
window.clearTimeout(fadeInTimers[object.id]);
}
}
else
{
if(object.filters.alpha.opacity>filterMS)
{
object.filters.alpha.opacity-=stepIE;
fadeInTimers[object.id] = window.setTimeout("fadeIn(fadeObjects["+object.id+"], "+filterMS+", "+optionsNS+")", speed);
}
else
{
window.clearTimeout(fadeInTimers[object.id]);
}
}
}
function fadeOut(object,filterMS,optionsNS)
{
if(fadeInTimers[object.id]!=undefined)
{
window.clearTimeout(fadeInTimers[object.id]);
}
if(object.style.MozOpacity)
{
if(object.style.MozOpacity<optionsNS)
{
object.style.MozOpacity=eval(object.style.MozOpacity)+stepNS;
fadeOutTimers[object.id] = window.setTimeout("fadeOut(fadeObjects["+object.id+"], "+filterMS+", "+optionsNS+")", speed);
}
else
{
window.clearTimeout(fadeOutTimers[object.id]);
}
}
else
{
if(object.filters.alpha.opacity<filterMS)
{
object.filters.alpha.opacity+=stepIE;
fadeOutTimers[object.id] = window.setTimeout("fadeOut(fadeObjects["+object.id+"], "+filterMS+", "+optionsNS+")", speed);
}
else
{
window.clearTimeout(fadeOutTimers[object.id]);
}
}
}
</script>
</head>
<body>
<img src="deinBild.gif" id="0" style="filter:alpha(opacity=100); -moz-opacity: 0.9;" onmouseover="fadeIn(this, 20, 0.1)" onmouseout="fadeOut(this, 100, 0.9)">
</body>
</html>
Zuletzt bearbeitet: