on resize window fix
mouseenter and mouseleave events, has a bug when window resizes
you need a fix, i put
$('.item-with-ul').unbind('mouseenter').unbind('mouseleave');
on line 102 of jquery.flexnav.js
100 });
101 } else if (settings.hoverIntent === false) {
102 $('.item-with-ul').unbind('mouseenter').unbind('mouseleave');
103 return $('.item-with-ul').on('mouseenter', showMenu).on('mouseleave', resetMenu);
104 }
Thanks!
I tested this fix and it solved the same issue for me. Thanks!
thanks a lot!!!
I'm having the problem when after opening a submenu item on small screens and then resize it back to desktop size the submenu I opened in the small screen remains open in desktop view.
I've tried adding the fix above but the problem remains.
Is there any other fix I could try?
Thanks
Wayne.
hi, you can avoid that problem simply adding this line to js
line 75 on resize event
75 resizer = function() {
76 $('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none'); // <--- this line
update: no need to add the full line, just adding .css('display','none'); on line 94 works aswell
92 92 $nav.removeClass('flexnav-show').find('.item-with-ul').on();
93 - $('.item-with-ul').find('ul').removeClass('flexnav-show');
93 + $('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none');
94 94 resetMenu();
Thanks,
I added the code where you suggested, this however hid the sub menu whenever the browser resized. I looked and added to line 89 so that it only hides the sub nav when the screen is made larger than the breakpoint.
88 } else if ($(window).width() > breakpoint) { 89 $('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none');
Thanks again
Wayne.
What is about to provide a pull requests? I have seen many addtional code in other issues that fix various problems, but nobody sent pull requests. Are they not accepted?
Very confusing.. Dunno if what's posted here in this conversation is the solution to the issue or the TWO pull requests (#160 & #167) apparently addressing this issue.. (neither PR has been accepted) Seems like this issue has been reported back at least 12 months..