Scroll Down on Mouseover

[Total: 0    Average: 0/5]

This script will scroll down (vertically) when the “down” link is moused over.

Body Code:

<script>
var AMOUNT=1; /* distance to scroll for each time */
var TIME=35; /* milliseconds */
var timer=null;
function scrollIt(v)
{
var direction=v?1:-1;
var distance=AMOUNT*direction;
window.scrollBy(0,distance);
}
function down(v)
{
  if(timer) { clearInterval(timer); timer=null; }
  if(v)timer=setInterval("scrollIt(true)",TIME);
}
</script>
<a href="javascript:void(0)" onmouseout="down(false)" onmouseover="down(true)">down</a>
a<BR>
b<BR>
c<BR>
d<BR>
e<BR>
f<BR>
g<BR>
h<BR>
i<BR>
j<BR>
k<BR>
l<BR>
m<BR>
n<BR>
o<BR>
p<BR>
q<BR>
r<BR>
s<BR>
t<BR>
u<BR>
v<BR>
w<BR>
x<BR>
y<BR>
z<BR>
<HR>
a<BR>
b<BR>
c<BR>
d<BR>
e<BR>
f<BR>
g<BR>
h<BR>
i<BR>
j<BR>
k<BR>
l<BR>
m<BR>
n<BR>
o<BR>
p<BR>
q<BR>
r<BR>
s<BR>
t<BR>
u<BR>
v<BR>
w<BR>
x<BR>
y<BR>
z<BR>

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *