How to make Twitter Bootstrap menu dropdown on hover rather than click

后端 未结 30 2631
小鲜肉
小鲜肉 2020-11-22 02:08

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 t

30条回答
  •  囚心锁ツ
    2020-11-22 02:25

    This works for Bootstrap V4

    JS:

    
    

    Vanilla Bootstrap 4 Dropdown HTML except for the addition of the dropdown-hover class:

    If you don't want to selectively enable the hover feature by using the .dropdown-hover class then simply change the jquery selector from .dropdown-hover to .dropdown.

提交回复
热议问题