1jQuery(document).ready(function ($) { 2 3 4 $(".mobilemenu-main").each(function () { 5 var e = $(this); 6 var icon = e.siblings(".mobile-menu-icon"); 7 icon.on("click", function () { 8 e.addClass("active"); 9 $(this).attr("aria-expanded",$(this).attr("aria-expanded") == "true" ? "false" : "true"); 10 $("html").addClass("opne-mobilemenu"); 11 setTimeout(function(){ 12 e.find("a:visible").eq(0).trigger("focus"); 13 },400) 14 }) 15 e.find(".mobileclose").on("click", function () { 16 e.removeClass("active"); 17 $("html").removeClass("opne-mobilemenu"); 18 icon.trigger("focus"); 19 icon.attr("aria-expanded",$(this).attr("aria-expanded") == "true" ? "false" : "true"); 20 }) 21 e.find(".gomenu .dir >a").after('<button type="button" class="arrows" aria-haspopup="true" aria-expanded="false" aria-label="'+e.data("opensubmenu")+'"><i></i></button>') 22 23 e.find(".arrows").on("click", function () { 24 $(this).toggleClass("active").parent().toggleClass("active"); 25 $(this).siblings("ul").stop().slideToggle().parent().siblings().removeClass("active").children("ul").slideUp().siblings().removeClass("active"); 26 27 if($(this).hasClass("active")){ 28 $(this).attr("aria-expanded","true"); 29 $(this).parent().siblings().children("button").attr("aria-expanded","false"); 30 }else{ 31 $(this).attr("aria-expanded","false"); 32 } 33 34 }) 35 36 $("body").append(e); 37 38 e.find(".subcurrent").parent("ul").siblings(".arrows").trigger("click"); 39 40 e.find('a[href*="#"]:not(.mm-btn):not(.mm-next):not(.mm-title):not(.mm-subblocker)').on("click", function () { 41 if (jQuery(this.hash).length) { 42 $(".mobileclose").trigger("click"); 43 } 44 }) 45 e.find('a[href="javascript:;"]').on("click", function () { 46 $(this).siblings(".arrows").trigger("click"); 47 }) 48 49 e.keydown(function(event){ 50 var t= $(this); 51 if(event.keyCode==27){ 52 e.find(".mobileclose").trigger("click"); 53 }else if (event.which == 9) { 54 var o = t.find('*'); 55 var focusItems = o.filter("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(':visible') 56 57 // $.extend(focusItems, e.find(".mobileclose")); 58 // console.log(focusItems) 59 60 var focusItemsLength = focusItems.length; 61 var focusIndex = focusItems.index(jQuery(':focus')); 62 if (event.shiftKey) { 63 if (focusIndex == 0) { 64 focusItems.get(focusItemsLength - 1).focus(); 65 event.preventDefault(); 66 } 67 } else { 68 if (focusIndex == focusItemsLength - 1) { 69 focusItems.get(0).focus(); 70 event.preventDefault(); 71 } 72 } 73 } 74 }) 75 76 77 78 }) 79});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.