boostrap的导航栏不提供鼠标滑过展开,通过给类为dropdown的li标签添加和移除open类实现
$(function () {$(".dropdown").mouseover(function () {$(this).addClass("open");});$(".dropdown").mouseleave(function(){$(this).removeClass("open");})})
时间:2023-08-13 06:22:27
boostrap的导航栏不提供鼠标滑过展开,通过给类为dropdown的li标签添加和移除open类实现
$(function () {$(".dropdown").mouseover(function () {$(this).addClass("open");});$(".dropdown").mouseleave(function(){$(this).removeClass("open");})})