I'm trying to get the page to scroll 100% to the right when someone clicks the 'click me' link. Here is my html below. Normally i would put java and css in an external file, but this is simpeler now.
<!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=utf-8" />
<title>Sample page</title>
<script language="text/javascript" src="jquery.js"></script>
<script language="text/javascript">
$(document).ready(function(){
$('a').hover(function(){
$('body').scrollTo( {top:'0px', left:'100%'}, 800 );
});
});
</script>
<style>
body{
width:300%;
height:100%;}
</style>
</head>
<body>
<a href="#">click here</a>
</body>
</html>
My problem is, why doesn't the script scroll to the right when i click te button?