Reputation: 433
That link got the same problem as the one I'm having: issue regarding dropdown menu
This is my code
$("document").ready(function() {
menuFunc ();
});
function menuFunc (){
$('#nav').on('mouseenter mouseleave','li',function (){
$(this)
.removeClass('noJS')
.children('ul')
.slideToggle(200);
});
};
How and where to use the .stop() to fix this issue?
Upvotes: 0
Views: 37
Reputation: 25527
Try like this
function menuFunc (){
$('#nav').on('mouseenter mouseleave','li',function (){
$(this)
.removeClass('noJS')
.children('ul').stop()
.slideToggle(200);
});
};
Upvotes: 1