Parašė Vaidotas-· 2008 Vas. 16 23:02:12
#1
Yra toks kodas:
<SCRIPT>
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ //do this so I can take a string too
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
</SCRIPT>
Ji reikia iterpti tarp <head> ir dar vienas kodas kuri reikia iterpt pries src
onmouseover=nereidFade(this,100,10,30) onmouseout=nereidFade(this,30,10,5) style="FILTER: alpha(opacity=30)"
kaip reikia visa tai padaryt, kad veiktų panalėj????