• Resolved prokops

    (@prokops)


    Hello!

    I made a link on my front page that opens the mobile menu. What I need is to be able to target a specific submenu for open. I would like the accordion to open with the menu item “Cucumbers” already open as illustrated below. Is that possible?

    VEGGIES
    .L MAIZ
    .L BEETS
    .L CUCUMBERS
    ..L YELLOW
    ..L GREEN
    .L SALADS

    • This topic was modified 4 years, 10 months ago by prokops. Reason: Refocus of question
    • This topic was modified 4 years, 10 months ago by prokops.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter prokops

    (@prokops)

    I think the trick must be to manipulate the data-pos or aria-controls of the link, but I am not sure how.

    This is my link:

    <a href="#" data-open="#main-menu" data-pos="<?php echo flatsome_option('mobile_overlay');?>" data-bg="main-menu-overlay" data-color="<?php echo flatsome_option('mobile_overlay_color');?>" class="<?php echo get_flatsome_icon_class($icon_style, 'small'); ?>" aria-controls="main-menu" aria-expanded="true"><center style="color:black;">Open Menu</center></a>

    Plugin Author megamenu

    (@megamenu)

    Hi prokops,

    Please can you post a link to your site so I can take a look? The html you’ve pasted is from your theme, so it’s not code that I am familiar with.

    Regards,
    Tom

    Thread Starter prokops

    (@prokops)

    Sure, the site is: https://dev.sagatrim.dk/
    The theme is Flatsome.

    Plugin Author megamenu

    (@megamenu)

    Hi prokops,

    Thanks. I can see you’re using MMM for the desktop menu, but the mobile menu is being controlled by Flatsome, so you’ll need to ask this question to your theme authors. My guess is that you would need to use jQuery to listen for a click on the mobile toggle button, and add an “active” class to the list item of the sub menu you want to open. Your theme authors should be able to give you some more accurate help.

    Regards,
    Tom

    Thread Starter prokops

    (@prokops)

    The answer for the desktop version is here: https://www.megamenu.com/documentation/javascript-api/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Open SPECIFIC mobile side menu item with link’ is closed to new replies.