see also http://www.dynamicdrive.com/forums/s...-old-DD-script
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
.left {
position:fixed;right:80px;bottom:50px;width:25px;height:25px;background-Color:red;text-Align:center;z-Index:100;
}
.right {
position:fixed;right:50px;bottom:50px;width:25px;height:25px;background-Color:red;text-Align:center;z-Index:100;
}
.up {
position:fixed;right:65px;bottom:80px;width:25px;height:25px;background-Color:red;text-Align:center;z-Index:100;
}
.down {
position:fixed;right:65px;bottom:20px;width:25px;height:25px;background-Color:red;text-Align:center;z-Index:100;
}
/*]]>*/
</style>
</head>
<body>
<div style="width:5000px;height:5050px;background-Color:blue" >
</div>
<div class="up" onmouseover="scrollwindow(0,-10);" onmouseout="scrollwindow();">U</div>
<div class="down" onmouseover="scrollwindow(0,10);" onmouseout="scrollwindow();">D</div>
<div class="left" onmouseover="scrollwindow(-10,0);" onmouseout="scrollwindow();">L</div>
<div class="right" onmouseover="scrollwindow(10,0);" onmouseout="scrollwindow();">R</div>
<script type="text/javascript">
/*<![CDATA[*/
function scrollwindow(x,y){
clearTimeout(scrollwindow.to);
if (typeof(x)=='number'&&typeof(y)=='number'){
window.scrollBy(x,y);
scrollwindow.to=setTimeout(function(){ scrollwindow(x,y); },50);
}
}
/*]]>*/
</script>
</body>
</html>
Bookmarks