[jQuery] Just started and I'm stuck

[jQuery] Just started and I'm stuck

Hello I just started with jQuery and I'm stuck I'm trying to script the jquery code in a .js file but it doesn't work I think somthing is wrong with my code but I'm not sure forgive me if this isn't the right post format.

html code:
<html>
<head>

<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="script.js"></script>

</head>
<body>

javascript:

$(document).ready(function(){
$('nav2').hover(function(){
$(this).css('background-color','grey');
$(this).css('color','white');
},
function(){
$(this).css('background-color','white');
$(this).css('color','grey');
});
});