I tried using jQuery on my website, but it did not seem to work. I figured I was doing something wrong, so I tried copying a codecademy lesson that I completed onto a test site. Here is the code:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Test Codecademy Lesson</title>
<link rel='stylesheet' type='text/css' href='stylesheet.css'/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript' src='script.js'></script>
</head>
<body>
<img src="http://i1061.photobucket.com/albums/t480/ericqweinstein/elevator.png"/>
</body>
</html>
CSS
body {
margin: 0;
padding: 0;
}
img {
position: absolute;
}
Javascript/jQuery
$(document).ready(function() {
$('img').animate({top:'+=100px'},1000)
});
Is someone able to tell me why this code is not working? My browser is Chrome and I have the latest version.