Library code snippets
Fading Scrollbar
By Peeyush Nigam, published on 07 Apr 2002
The following Javascript code can be used to design a Fading Scrollbar. The code uses tricks of CSS & Javascript and can be operated on Internet EX. 5 & Above.
<html>
<head><title>Changing the color of scrollbars. using style sheets.</title>
<script langugae="javascript1.2">
<!--
var clrcodes=new Array("#4362a1","#5267a7","#5c72af","#697eb6","#6f83b9","#7b8ebf","#91a0ca",
"#a9b6d6","#b9c4dd","#d1d9e9","#dde2ee","#f2f4f9","#ffffff");
var counter=0;
function blink(){
document.body.style.scrollbarBaseColor=clrcodes[counter];
var timer=setTimeout("blink()",100)
counter++
if(counter>=14){counter=0;}
}
//-->
</script>
</head>
<body onLoad="blink()">
<p align="justify" style="width:300;height:100">
<b>FADING SCROLLBAR.</b>
<BR>Code By.. <br><b>Peeyush Nigam</b><br>PARI WEB SERVICES™<BR>webmaster@avenues-india.com
</p>
</body>
</html>
Related articles
Related discussion
-
An old chestnut: Scrolling DIVs. Can I use onmouseover/onmouseout?
by Skunk (1 replies)
-
code highlighting using jquery
by pjm (1 replies)
-
Problem when using TemplateField and ImageButton
by mhuff84 (14 replies)
-
dropdownlist for country,state and city
by jack_tom (2 replies)
-
popup window in vb.net... how it's work?..
by yf2009 (6 replies)
Related podcasts
-
Raleigh Code Camp reflections, Chrome wins speed tests, GroovyMag
I attended the Raleigh Code Camp last week and had a blast meeting some awesome people (but of course there's never enough time to meet everyone you'd like to!). Some great sessions I attended covered the MS MVC platform and an introduction to MS DLR, both of which I discuss here in a bit more d...
Events coming up
-
Oct
28
Web Standards Group (Sydney)
North Sydney, Australia
TBA
can u make the scrollbar to fading into different color to fade, means using multidimension array of your code?
cauze your code was:
var clrcodes=new Array("#4362a1","#5267a7","#5c72af","#697eb6","#6f83b9","#7b8ebf","#91a0ca", "#a9b6d6","#b9c4dd","#d1d9e9","#dde2ee","#f2f4f9","#ffffff");
how to add a new array so the fading will add different color to fade ? [complicated to say]
This thread is for discussions of Fading Scrollbar.