Answer the question
In order to leave comments, you need to log in
How to make dropdown menu on hover and not on click?
I have a menu and it has a submenu, made on the Wordpress engine. Added the necessary classes to make the dropdown menu on bootstrap, just need to make it happen on the hover event. I tried to find this code in the bootstrap.js source, but I did not figure it out.
Already tried to do it with css. Yes, the menu drops out on hover, but! The click event does not disappear, which is logical. Those. when you click on the main menu item, the .open class will be added to this item and it will be tinted with the standard bootstrap color and the submenu will remain open until you click somewhere else. Also in bootstrap the main menu is set to preventDefault so I can't navigate to the main menu pages.
What do you advise? Need to edit the bootstrap.js file? I thought that in the customizer you can configure, but there is no such thing. Tell
Answer the question
In order to leave comments, you need to log in
found the code in bootstrap.js
THERE is the dropdown plugin section. There are three click events in a row. Changed to hover and it worked
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question