Need some help with my Jquery
Hello,
I am trying to make a menu and I almost finished it, but i ran into a problem. When I click a menu item, the submenu is showing it self perfectly, and when I hover over it it stays, hover out and it goes back up. Up to that point everything works as a charm.
Now my problem is, when you click one of the menu options, the submenu shows: But when you just go UP with your mouse (instead of going over the submenu) it's staying.
The website i'm talking about is here: http://dev.teamtgooi.com/
And the Jquery code is:
- $(document).ready(function(){
$("div.menuitem").click(function() {
$("div.menuitem").find("div.firstparagraph").slideUp("fast");
$(this).find("div.firstparagraph").slideDown("fast").show();
$(this).find("div.firstparagraph").hover(function() {
}, function(){
$(this).slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
});
//Following events are applied to the trigger (Hover events for the trigger)
}).hover(function() {
$(this).addClass("subhover"); //On hover over, add class "subhover"
}, function(){ //On Hover Out
$(this).removeClass("subhover"); //On hover out, remove class "subhover"
});
});
Can someone help me with this?
Thijs