marioloncarek / megamenu-js

Last responsive megamenu you'll ever need
MIT License
360 stars 115 forks source link

Hover intent #13

Open Eugene1984 opened 7 years ago

Eugene1984 commented 7 years ago

Hi thank you for an awesome megamenu!

Any way to make it hoverintent on hover on and off? Reason is sometimes when you go to an item in the opened megamenu you accidentally touch an element next to it then menu disapeares and the item you touched opens.

Example: http://www.allgreen.co.za/

I installed: https://github.com/briancherne/jquery-hoverIntent

And changed $(".menu > ul > li").hoverIntent(function (e) { if ($(window).width() > 943) { $(this).children("ul").stop(true, false).fadeToggle(150); e.preventDefault(); } });

Tx!

marioloncarek commented 7 years ago

Hello! Thanks for kind words!

I need to try to make an example i cant tell you anything until that. Of course everything is possible. Here is just an idea: why dont you try and use jquerys native delay function and with that you could remove the hoverintent library. That would be my first try