user892134
user892134

Reputation: 3214

Drop down not working correctly

When hovering over Categories the drop down menu displays but as i move the mouse over the children it is menu constantly disappearing?

Here is the jsFiddle http://jsfiddle.net/mdanz/hvF8P/17/

Upvotes: 2

Views: 82

Answers (1)

Rob W
Rob W

Reputation: 349242

You shouldn't use mouseout. Instead, supply two functions to hover:

$('#category2').hover(function() {
   $('#category2').show();   // This function will be called upon mouseover
}, function(e) {
    $('#category2').hide();  // This one will properly be called on mouseout
});

Fiddle: http://jsfiddle.net/hvF8P/20/

Side note: Inside the functions, instead of using $('#category2'), you can also use $(this).

Upvotes: 3

Related Questions