I'd like to have my Bootstrap menu automatically drop down on hover, rather than having to click the menu title. I'd also like to lose the little arrows next to the menu titles.
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- How to add a “active” class to a carousel first el
- Add animation to jQuery function Interval
- jQuery hover to slide?
This should hide the drop downs and their carets if they are smaller than a tablet.
For the caret... I haven't seen any one specifying simple CSS that totally blocks the caret.
Here you go:
In my opinion the best way is like this:
Sample markup:
You can use the default
$().dropdown('toggle')
method to toggle the dropdown menu on hover:In addition to the answer from "My Head Hurts" (which was great):
There are 2 lingering issues:
The solution to (1) is removing the "class" and "data-toggle" elements from the nav link
This also gives you the ability to create a link to your parent page - which wasn't possible with the default implementation. You can just replace the "#" with whatever page you want to send the user.
The solution to (2) is removing the margin-top on the .dropdown-menu selector
I've used a bit of jQuery: