Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果没有submenu类,则此方法有效in,但在另一个页面上有一个带有类的子菜单,in此脚本仍然运行。
submenu
in
$(".nav-submenu").not(".in").eq(0).addClass("in");
if(!$(".nav-submenu.in").length) $(".nav-submenu").eq(0).addClass("in");