New to jquery - please help
Ok so Im pretty new to jquery. I was wondering if someone could tell me what im doing wrong with this simple drop down menu code:
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#nav a').onmouseover(function() {
$('#nav .subMenu').show('2000');
});
$('#nav a').onmouseout(function() {
$('#nav .subMenu').hide('2000');
});
</script>
<div id="nav">
<ul>
<li><a href="index.html"><img src="images/homeBtn.gif" alt="Home"/></a>
<div class="subMenu">Return to the home page.</div></li>
<li><a href="index.html"><img src="images/aboutBtn.gif" alt="Home"/></a></li>
ETC...
CSS:
.subMenu {
background-color:#00FF00;
width:50px;
height:50px;
display:none;
}
The only thing I can think of that different is those script tags are not in the header - which i didnt think was necessary (or is it?)
Cheers