»
EnglishFrenchVietnamese

Print - Tristate Rainbow Scrollbars - JavaScriptBank.com

Full version: jsB@nk » Browser » Scrollbars » Tristate Rainbow Scrollbars
URL: http://www.javascriptbank.com/tristate-rainbow-scrollbars.html

Tristate Rainbow Scrollbars © JavaScriptBank.comCauses all page scrollbar to blink in three colors; on/off control (optional) can turn effect on and off via links.

Full version: jsB@nk » Browser » Scrollbars » Tristate Rainbow Scrollbars
URL: http://www.javascriptbank.com/tristate-rainbow-scrollbars.html



JavaScript
<script>// Tristate Rainbow Scrollbars// CodeFilter.com// blink speed in milisecondsvar rate = 333;// true to start automatically, else falsevar DoIt = true// the three blink colorsvar Color1 = "#FF0000"var Color2 = "#00FF00"var Color3 = "#0000FF"// the color if/when turned offvar ColorX = "#C0C0C0"var i = 0;function doTriStateRainbow(){   if (document.all){      if (DoIt){         i++;         if (i==1) C = Color1         if (i==2) C = Color2         if (i==3) C = Color3         document.body.style.scrollbarBaseColor = C         if (i>2) i=0;         timer=setTimeout('doTriStateRainbow()', rate)      }else{         document.body.style.scrollbarBaseColor = ColorX        }   }   }</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onload="doTriStateRainbow()"><a href="#" onClick="DoIt=false">Turn off</a> | <a href="#" onClick="DoIt=true;doTriStateRainbow()">Turn on</a></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->