Rainbow Link Effects is the effect of changing link colors like a rainbow when the mouse is highlighted.
The code
<script language=javascript>/*<![CDATA[*/var timerID, srcElemActive, count=0, oldColor; var clrArray=new Array("D0CBFE", "8C80FD", "5543FC", "1B04E3", "E7FFE6", "B7FFB3", "80FF79", "0AC400", "FFD6D5", "FF9693", "FF3D37", "EA0600"); var ie=navigator.appName=="Microsoft Internet Explorer"?true:false, op=window.opera?true:false, ns=navigator.vendor?true:false; function ChangeColor(){if(srcElemActive){srcElemActive.style.color="#"+clrArray[count++]}
if(count==(clrArray.length-1)){count=0}
}
function makeRainbow(a){if(op){return}
var c=getObject(a); var b=""; if(c.tagName=="A"&&c.href!=""){srcElemActive=c; oldColor=c.style.color; timerID=setInterval("ChangeColor()",200)}
return true}
function stopRainbow(a){var b=getObject(a); if(op&&b.className!="rate_item"){return}
if(srcElemActive&&b.tagName=="A"&&b.href!=""){srcElemActive=null; b.style.color=oldColor; clearInterval(timerID)}
}
function getObject(a){var b; if(ie){b=event.srcElement}
else{b=a.target}
return b}
document.onmouseover=makeRainbow; document.onmouseout=stopRainbow; /*]]>*/</script>
Placement of the script in the blog that is in your layout gadgets or in templates, above the </body>
0 Comments:
Posting Komentar