OK, so what I need is fairly straightforward.
I have set up a navbar with some dropdown menus in it (using class="dropdown-toggle" data-toggle="dropdown"
), and it works fine.
The thing is it works “onClick
“, while I would prefer if it worked “onHover
“.
Is there any built-in way to do this?
Advertisement
Answer
The easiest solution would be in CSS. Add something like…
JavaScript
x
5
1
.dropdown:hover .dropdown-menu {
2
display: block;
3
margin-top: 0; /* remove the gap so it doesn't close */
4
}
5