Is my javascript wrong?
Very simple javascript that doesn't work (I am learning at the moment).
I want the DIV to hide on mouse over. index.html and script.js are in the
same folder. I am opening this in Chrome.
index.html:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script> type='text/javascript' src='script.js' </script>
</head>
<body>
<div>
Hello world
</div>
</body>
</html>
script.js:
$(document).ready(function() {
$('div').mouseenter(function () {
$('div').hide();
});
});
Any ideas why this is not working?
No comments:
Post a Comment