New answers tagged

0

Just open file topmenu.phtml and change: From: <ol class="nav-primary" data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'> <?= /* @noEscape */ $_menuHtml?> <?= $block->getChildHtml()...


0

In my case (Magento 2.3.4), the solution from @Vince Verhoeven worked partially: I wanted the top level links to open the submenu in case there was one. So I had to detect whether there was a submenu or not to control this logic. Just after: 'click .ui-menu-item:has(a)': function (event) { I added a condition for the code to be executed: if ($(event.target)....


Top 50 recent answers are included