Kod:
===========================================================
Script: TriState Rainbow Scrollbar Script I
Function: Causes all page scrollbars to blink in three
colors; on/off control (optional) can turn effect
on and off via links
Browsers: IE 5.5 (degrades gracefully on other browsers)
Author: etLux
===========================================================
Step 1.
Put the following script in the head of your page:
<script>
// (C) 2000 by CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
// blink speed in miliseconds
var rate = 333;
// true to start automatically, else false
var DoIt = true
// the three blink colors
var Color1 = "#FF0000"
var Color2 = "#00FF00"
var Color3 = "#0000FF"
// the color if/when turned off
var ColorX = "#C0C0C0"
var i = 0;
function doTriStateRainbow(){
if (********.all){
if (DoIt){
i++;
if (i==1) C = Color1
if (i==2) C = Color2
if (i==3) C = Color3
********.body.style.scrollbarBaseColor = C
if (i>2) i=0;
timer=setTimeout(''doTriStateRainbow()'', rate)
}else{
********.body.style.scrollbarBaseColor = ColorX
}
}
}
</script>
===========================================================
Step 2.
Put this onload event call in your body tag:
<body onload="doTriStateRainbow()">
===========================================================
Step 3. (Optional)
To add on and off controls, use the following:
<a href="#" onClick="DoIt=false">Off</a>
<a href="#" onClick="DoIt=true;doTriStateRainbow()">On</a>
===========================================================