jQuery’s hover() function works just like any other event, except that instead of taking one function as an argument, it accepts two functions. The first function runs when the mouse travels over the element and the second function runs when the mouse moves off the element. The basic structure looks like this: $('#element').hover(function1, function2); For example, when mouses over a link with an ID of menu, you want a submenu with an ID of submenu to appear. Moving the mouse off of the link hides the submenu again. The following jQuery code will do the trick. $('#menu').hover(function() {
$('#submenu').show();
}, function() {
$('#submenu').hide();
});