• Hi there

    I am hoping that someone’s had this issue before and can help us. The hover effect on the top level menu items stops working after a while on our page. It happens for instance when you search (CTRL + F) for a word on the page or manually resize the browser. After this the hover stops working and the only way to reveal the mega menu sub items is to click on the chevrons.

    Anyone have an idea why this is happening and how to fix it?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi onurkurtic,

    Please can you post a link to your site so I can take a look?

    Do you see any JavaScript errors in the console after resizing your browser?

    Regards,
    Tom

    Thread Starter onurkurtic

    (@onurkurtic)

    Plugin Author megamenu

    (@megamenu)

    Hi onurkurtic,

    Thanks.

    The issue is in this file somewhere:

    https://ivaripublic.staging.wpengine.com/wp-content/themes/ivari/js/custom.js?ver=1575908678

    … possibly in the “create_hooks_large” or “destroy_hooks_mobile” function. Please try commenting those out to try and work out exactly where the issue is coming from.

    The actual issue is that the parent items should be/are given a class of “mega-toggle-on” when you over over a menu item. But when you resize the screen, the parent items are given a class of “active” instead, which shouldn’t happen.

    Regards,
    Tom

    Thread Starter onurkurtic

    (@onurkurtic)

    Thank you! It looks like it may have been the destroy_hooks_large() function inside the big create_hooks_large() function that was causing it. When I comment out destroy_hooks_large() it seems to fix the issue. I hope it doesn’t break anything else

    Plugin Author megamenu

    (@megamenu)

    Hi onurjurtic,

    The only problem you will have is that if the theme updates then you will need to reapply that edit each time.

    I can see now where the destroy_hooks_large() function is being applied to the menu now. It is adding itself to “.main-menu li”, and “main-menu” is present on the menu here:

    https://screencast.com/t/XdQo5Z87

    That class is being added by this (custom?) JavaScript:

    https://screencast.com/t/leT7WbYy

    … so if you remove that line of JavaScript, I think it may all start working as it should.

    Regards,
    Tom

    Thread Starter onurkurtic

    (@onurkurtic)

    Similar to this problem, on the mobile menu (when visiting the site on an iPhone for instance) tapping on a menu item expands it no problem. However when you try to tap on it again, it won’t collapse. You need to tap on the tiny little chevron icon on the right hand side.

    Do you know why this is ?

    Plugin Author megamenu

    (@megamenu)

    Hi onurjurtic,

    Please go to Mega Menu > Menu Themes > General Settings and set Second Click Behaviour to “First click opens sub menu, second click closes sub menu”.

    Regards,
    Tom

    Thread Starter onurkurtic

    (@onurkurtic)

    Amazing thanks a lot!
    Last question (I promise :))
    on iPhone landscape orientation and on iPad portrait layout, the 3 column layout under “about ivari” is tacking into 1 column. How do I adjust the break points for that so that it doesn’t stack until iPhone portrait?

    Plugin Author megamenu

    (@megamenu)

    Hi onurkurtic,

    The menu is picking up some CSS from your theme. To fix it, try this custom CSS:

    #mega-menu-wrap-consumer_main_menu li {
        clear: none;
    }

    Regards,
    Tom

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hover effect stops working after a while’ is closed to new replies.