window.onDomReady(function(){ new SmoothScroll({duration: 1800}); });
and here's the full source 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript" src="mootools.js"></script>
<script type="text/javascript">
window.onDomReady(function(){ new SmoothScroll({duration: 2800}); });
</script>
</head>
<body>
<div style="position:absolute; right:100px; top:300px"><a href="#red" title="smoothly scroll to the red anchor">red</a> / <a href="#blue" title="smoothly scroll to the blue anchor">blue</a> / <a href="#gray" title="smoothly scroll to the gray anchor">gray</a> / <a href="#yellow" title="smoothly scroll to the yellow anchor">yellow</a> / <a href="#black" title="smoothly scroll to the black anchor">black</a> / <a href="#green" title="smoothly scroll to the green anchor">green</a></div>
<a name="red" id="red"></a>
<div style="width:300px;height:300px;background-color:red;margin:20px;"></div>
<a name="blue" id="blue"></a>
<div style="width:300px;height:300px;background-color:blue;margin:20px;"></div>
<a name="gray" id="gray"></a>
<div style="width:300px;height:300px;background-color:gray;margin:20px;"></div>
<a name="yellow" id="yellow"></a>
<div style="width:300px;height:300px;background-color:yellow;margin:20px;"></div>
<a name="black" id="black"></a>
<div style="width:300px;height:300px;background-color:black;margin:20px;"></div>
<a name="green" id="green"></a>
<div style="width:300px;height:300px;background-color:green;margin:20px;"></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</body>
</html>
Added by roScripts on April-18-2007, 3:53 pm
