1 line
1.7 KiB
JavaScript
1 line
1.7 KiB
JavaScript
jQuery(document).ready((function(){jQuery(".side-nav-left .side-nav li").each((function(){jQuery(this).find("> .children").length&&(jQuery(".rtl").length?jQuery(this).find("> a").prepend('<span class="arrow"></span>'):jQuery(this).find("> a").append('<span class="arrow"></span>'))})),jQuery(".side-nav-right .side-nav li").each((function(){jQuery(this).find("> .children").length&&(jQuery("body.rtl").length?jQuery(this).find("> a").append('<span class="arrow"></span>'):jQuery(this).find("> a").prepend('<span class="arrow"></span>'))})),jQuery(".side-nav .current_page_item").each((function(){var e=jQuery(this).parent(),n=jQuery(this).find(".children");n.length&&n.show("slow"),e.hasClass("side-nav")&&jQuery(this).find("ul").show("slow"),e.hasClass("children")&&jQuery(this).parents("ul").show("slow")}))})),jQuery(window).on("load",(function(){"click"===avadaSideNavVars.sidenav_behavior?jQuery(".side-nav li a .arrow").on("click",(function(e){var n=jQuery(this).parent().parent(),i=n.find("> .children");if(e.preventDefault(),n.hasClass(".page_item_has_children").length&&(i.length&&!i.is(":visible")?i.stop(!0,!0).slideDown("slow"):i.stop(!0,!0).slideUp("slow")),jQuery(this).parent().parent(".page_item_has_children.current_page_item").length)return!1})):jQuery(".side-nav li").each((function(){var e;jQuery(this).hover((function(){var n=jQuery(this).find("> .children");clearTimeout(e),e=setTimeout((function(){n.length&&n.stop(!0,!0).slideDown("slow")}),500)}),(function(){var n=jQuery(this),i=n.find(".children");clearTimeout(e),e=setTimeout((function(){0===n.find(".current_page_item").length&&!1===n.hasClass("current_page_item")&&i.stop(!0,!0).slideUp("slow")}),500)}))}))})); |