In Magento 2 for the main menu, they dropdown with hover. How to change the dropdown on click instead of 'hover'.

2 Answers 2


Step 1 : You need to remove the hover css for submenu.

Step 2 : After that you can add toggle event in the JS file for sub-menu.

  • It's adding inline css on hover. which js file i should customize to control it
    – Nayem323
    Commented Jan 23, 2019 at 4:16
  • @RaselUddin No, create new custom css and custom js file in your theme and implement your code in these file. Commented Jan 23, 2019 at 4:59

more details and example can help thanks!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.