»
EnglishFrenchVietnamese

Print - Dynamic Fading Links - JavaScriptBank.com

Full version: jsB@nk » Link » Dynamic Fading Links
URL: https://www.javascriptbank.com/dynamic-fading-links.html

Dynamic Fading Links © JavaScriptBank.comUses OnMouseOver and OnMouseOut events with a series of images to create a fade effect.

Full version: jsB@nk » Link » Dynamic Fading Links
URL: https://www.javascriptbank.com/dynamic-fading-links.html



CSS
<STYLE type=text/css>BODY DIV#container A {COLOR: lightyellow; FONT-WEIGHT: bold}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript type=text/javascript><!--var a=new Array();var colorCount=0,bgcolorCount=255;var Timer;window.onload=load;function load(){  a=document.getElementById('container').getElementsByTagName('a');}function LoadAll(arrayID){ if(colorCount<255||bgcolorCount>0) {  with(a[arrayID].style){    color="rgb("+colorCount+","+colorCount+","+colorCount+")";  border="2 white outset";backgroundColor="rgb("+bgcolorCount+","+bgcolorCount+","+bgcolorCount+")";}colorCount+=4;bgcolorCount-=4; } Timer=setTimeout("LoadAll("+arrayID+");",10);}function OMOver(arrayID){  clearTimeout(Timer);  bgcolorCount=255;  colorCount=0;  LoadAll(arrayID);}function OMOut(arrayID){  bgcolorCount=0;  colorCount=255;  with(a[arrayID].style){  color="lightyellow";border="0";backgroundColor="black";}}function OMDown(arrayID){  with(a[arrayID].style){  colorCount=255;bgcolorCount=0;  border="2 red inset";}}//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY bgcolor=black text=white><DIV id=container><A href="http://jsbank.topcities.com" onmousedown=OMDown(0) onmouseout=OMOut(0) onmouseover=OMOver(0)># One</A> <A href="http://jsbank.topcities.com" onmousedown=OMDown(1) onmouseout=OMOut(1) onmouseover=OMOver(1)># Two</A> <A href="http://jsbank.topcities.com" onmousedown=OMDown(2) onmouseout=OMOut(2) onmouseover=OMOver(2)># Three</A> <A href="http://jsbank.topcities.com" onmousedown=OMDown(3) onmouseout=OMOut(3) onmouseover=OMOver(3)># Four</A> <A href="http://jsbank.topcities.com" onmousedown=OMDown(4) onmouseout=OMOut(4) onmouseover=OMOver(4)># Five</A></div></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->