Home › Forums › WoodMart support forum › Mobile off canvas menu doesn’t close upon click
Mobile off canvas menu doesn’t close upon click
- This topic has 8 replies, 4 voices, and was last updated 2 years, 7 months ago by Artem Temos.
-
AuthorPosts
-
April 29, 2022 at 4:05 pm #372028
gonailsParticipantHi!
I can’t make the mobile off-canvas menu work. When I click on a menu item that has an anchor to a section on that page, it does scroll to it, but it does not close itself (it used to do it). Also, if I upon a popup, it also doesn’t do it.
I have deactivated all the plugins except woodmart core, elementor and woocommerce.
Regards.
April 29, 2022 at 4:13 pm #372034
gonailsParticipantAlso, in order to test this do the following:
1) Visit staging.gonails.com.ar
2) Click on the hamburger menu and click on LOCALES. This one will open the pop-up.
3) Close the popup and try the next option, “RESERVAS” which has the menu anchor.April 30, 2022 at 9:13 am #372142
Aizaz Imtiaz AwanKeymasterHello,
Please edit the menu item and try enabling the option of one page anchor.
Screenshot for Clarification: https://gyazo.com/b4f36e1c3ac66c2bb179b552edb2741d
Best Regards
May 1, 2022 at 2:29 pm #372300
gonailsParticipantThanks!, that worked for the one page anchor.
I still have the elementor pop-up problem. I have a selector .popup-locales on the elementor popup and on the menu no URL but the CSS class as popup-locales. This way the popup opens, but the off canvas menu doesn’t close itself.
If I follow elementor’s tutorial (which I use for other non-woocommerce websites with the theme hello elementor), then the popup doesn’t even open (and the off canvas doesn’t close). This is the tutorial: https://elementor.com/help/how-to-trigger-a-popup-from-a-nav-menu-item/
May 2, 2022 at 10:49 am #372424
Bogdan DonovanKeymasterHi,
In our theme, both anchor and plugin popups don’t close the mobile menu. In this case, try to create a separate menu for the mobile header without following menu types.
As an alternative try to use the following custom code to place plugin popups over the theme mobile menu
.elementor-popup-modal { z-index: 99999 !important; }
Kind Regards
May 2, 2022 at 1:04 pm #372470
gonailsParticipantHi!
I actually could close the mobile menu with the anchor per the previous reply from your team. So this can be done.
There should be a way (js maybe?, I’m not that techy) to get this done. I for example use this code that I put in an HTML element in my popup menu in elementor to close it after a click:
<script> jQuery( document ).ready(function($){ $(document).on('click','.elementor-location-popup a', function(event){ elementorProFrontend.modules.popup.closePopup( {}, event); }) });</script>
Can this be tailored to Woodmart and put it somewhere?
Either way, you should include this in your features, it’s a basic expected behavior. The theme is great though.
May 3, 2022 at 2:03 pm #372752
Artem TemosKeymasterHello,
Try to use the following code snippet to achieve this. Note that it contains the ID of the menu item
248
so you might need to replace it if you want to apply it for another menu itemjQuery('#menu-item-248 > a').click(function(e){ jQuery('.wd-close-side').trigger('click'); });
Kind Regards
May 3, 2022 at 7:13 pm #372848
gonailsParticipantWonderful, it worked great, thanks!
May 4, 2022 at 9:24 am #372957
Artem TemosKeymasterYou are welcome! Feel free to contact us if you have any further questions.
Kind Regards
-
AuthorPosts
The topic ‘Mobile off canvas menu doesn’t close upon click’ is closed to new replies.
- You must be logged in to create new topics. Login / Register