Created
March 11, 2015 18:33
-
-
Save vikt82/d11ae0199d2a14287f23 to your computer and use it in GitHub Desktop.
Revisions
-
vikt82 created this gist
Mar 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ Сылка изменяющая цвета <script> var colors = new Array( "#008000", "green", "#000000", "#D3CF18", "#C6C68C", "green", "blue", "darkblue", "purple", "black", "red", "lime", "yellow"); var colorCounter=0; var timeoutId; var hoverLink; window.onload=function(){ var as=document.getElementsByTagName("a"); for(var i=0;i<as.length;i++){ as[i].onmouseover=function(){ if(this.style)hoverLink=this; hoverLink.style.color=colors[colorCounter++]; colorCounter%=colors.length; timeoutId=setTimeout(hoverLink.onmouseover,400); } as[i].onmouseout=function(){clearTimeout(timeoutId);hoverLink.style.color=document.linkColor;} } } </script>