Dropdown onclick not Hover

What is the simplest way to change the Bootstrap menu from dropping down on click, rather than on hovering?

sample url: http://riverc.mgns.se

Can this be achieved via bootstrap, purely by CSS or a bit of JavaScript?


在您的JavaScript代码中添加以下行:

$('.dropdown-toggle').dropdownHover();

In twitter bootstrap dropdown, the dropdown is controlled by css so click like process cnt be done using css, so you have to use javascript or jquery for this...

Idea is that use two class for that toggle,

.off { display:none; }
.on { display:block; }

Develop your script with the help of this, http://api.jquery.com/toggleClass/

链接地址: http://www.djcxy.com/p/75952.html

上一篇: 避免点击里面的下拉菜单

下一篇: 下拉onclick不悬停