• Resolved teresasumisu

    (@teresasumisu)


    Hi!
    Is it possible to close the submenu when clicking on the arrow when the submenu is opened?
    I have the option “First click will open a sub menu, second click will follow the link.” enabled.

    I guess the Plugin can’t do this, but maybe someone has a Javascript Hack for that and is willing to share. Thanks!

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

    (@megamenu)

    Hi Teresa,

    Try this; go to Mega Menu > Menu Themes > Custom Styling and add the following:

    #{$wrap} #{$menu} li.mega-menu-item.mega-menu-item-has-children.mega-toggle-on { 
        > a.mega-menu-link:after {
            display: none;
        }
        > a.mega-menu-link > span.mega-indicator {
            display: inline-block;
        }
    }

    Regards,
    Tom

    Thread Starter teresasumisu

    (@teresasumisu)

    Hi Tom!
    Thank you, but my intention was not to hide the Arrow Icon.
    I like to close the Submenu when it is open and the Arrow Icon is clicked.

    Plugin Author megamenu

    (@megamenu)

    Hi teresasumisu,

    Did you try the code? Please can you post a link to your site with the code in place?

    Regards,
    Tom

    Thread Starter teresasumisu

    (@teresasumisu)

    Here you go:
    LINK
    As you can see, with your code the Arrow Icon is disappearing when the submenu is opened.

    Plugin Author megamenu

    (@megamenu)

    Hi teresasumisu,

    I’m slightly confused here – I do not see that CSS in the CSS file. Can you undo the changes so the arrows appear again?

    Thread Starter teresasumisu

    (@teresasumisu)

    I am sorry for your confusion.
    Maybe this helps:
    This is the CSS:
    Style.css
    on the very bottom I added your code

    #mega-menu-wrap-primary #mega-menu-primary li.mega-menu-item.mega-menu-item-has-children.mega-toggle-on > a.mega-menu-link:after {
      display: none; }
      #mega-menu-wrap-primary #mega-menu-primary li.mega-menu-item.mega-menu-item-has-children.mega-toggle-on > a.mega-menu-link > span.mega-indicator {
        display: inline-block; }

    Should I undo the Changes now?

    Plugin Author megamenu

    (@megamenu)

    Ah, I have found this in your custom styling:

    https://screencast.com/t/lCGisnqnDR

    I can see you have already customised the arrow indicators. There may be other places where the arrows are hidden which I cannot find.

    In the next version of MMM (hopefully released next week), I have made it so that the indicators are clickable. You can already test this on megamenu.com.

    Please wait until the official release. After that, you may need to adjust your custom CSS to suit. We will no longer use the “:after” pseudo element to display the arrow, it will always be displayed using span.mega-indicator.

    Regards,
    Tom

    Thread Starter teresasumisu

    (@teresasumisu)

    Thank you so much!
    I am looking forward to it.

    Plugin Author megamenu

    (@megamenu)

    Hi teresasumisu,

    I’m going to set this to resolved, but feel free to open a new thread if you need to once 2.6.1 is out.

    Regards,
    Tom

    Thread Starter teresasumisu

    (@teresasumisu)

    Hi!
    I just read the release notes of 2.7 and it says “New: “Collapse sub menu” option to hide third/fourth level items within mega menus” .. I guess this should solve my Problem but I can’t find this option in the plugin options. Is this a Pro feature?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Close Menu when Second Click Follow Link is enabled’ is closed to new replies.