-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbsWalker.min.js
1 lines (1 loc) · 1.22 KB
/
bsWalker.min.js
1
(function(n){"use strict";n("#mainNav").fadeIn(500);let d=n(".navbar-nav"),e=n(".navbar-nav .menu-item-has-children"),a=n(".navbar-nav .menu-item-has-children .sub-menu");d.children("li").addClass("nav-item"),d.children("li").children("a").addClass("nav-link"),e.addClass("dropdown"),e.children("a").addClass("dropdown-toggle"),e.each(function(){let d=this.id.slice(10);n(this).children("a").attr({id:"menu-item-dropdown-"+d,href:"#","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"})}),a.addClass("dropdown-menu"),a.each(function(){let d=this.parentElement.id.slice(10);n(this).attr({"aria-labelledby":"menu-item-dropdown-"+d,role:"menu"})}),a.children("li").addClass("nav-item"),a.find("li.menu-item-has-children").removeClass("dropdown").addClass("dropdown-submenu"),a.children("li").children("a").addClass("dropdown-item"),n("ul.dropdown-menu [data-toggle='dropdown']").click(function(d){d.preventDefault(),d.stopPropagation(),n(this).siblings().toggleClass("show"),n(this).next().hasClass("show")||n(this).parents(".dropdown-menu").first().find(".show").removeClass("show"),n(this).parents("li.nav-item.dropdown.show").on("hidden.bs.dropdown",function(){n(".dropdown-submenu .show").removeClass("show")})})})(jQuery);