实现Bootstrap导航条可点击和鼠标悬停显示下拉菜单
程序员文章站
2023-12-28 21:40:16
...
http://blog.csdn.net/web874418927/article/details/50749472
<script>
$(document).ready(function(){
var init = new Init();
$(document).off('click.bs.dropdown.data-api');
init.dropdownitem();
});
</script>
Init.prototype.dropdownitem = function () {
$('li.dropdown').mouseover(function() {
$(this).addClass('open');
}).mouseout(function() {
$(this).removeClass('open');
});
}