Hello, I've designed a little site using HTML/CSS and i decided to add some Jquery that i learned. Unfortunately I can't figure out how to get it to work.
I tried linking to an outside script.js file similar the way I do my .css but no luck. Anyways heres the script. I got the code of codeacademy.com because the one I was using wasn't working so I'd figure I would use one from there lessons that worked.
Also for linking to external I did <script type="text/javascript" src="script.js"> </script>
sorry if I didn't insert the html properly, I couldn't find a option to do so.
<!DOCTYPE html>
<html>
<head>
<title>Krypton Redux</title>
<link rel='stylesheet' type='text/css' href='newcss.css'/>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
</head>
<body>
<div> </div>
<script>
$(document).ready(function() {
$('div').mouseenter(function() {
$(this).animate({
height: '+=10px'
});
});
$('div').mouseleave(function() {
$(this).animate({
height: '-=10px'
});
});
$('div').click(function() {
$(this).toggle(1000);
});
});
</script>
</body>
</html>