1/** 2 * 3 */ 4document.addEventListener( 5 "DOMContentLoaded", () => { 6 jQuery_navigation("ul.smartphone-nav-ul").css("display", ""); 7 8 try { 9 10 var mmMenuScript = document.getElementById('mmMenuScript'); 11 var mmMenuScriptVal = "new Mmenu( '#menu', { 'navbars': [{ 'position': 'bottom', 'content': '<a href=\'#\' id=\'mmMenuHomeLink\' onClick=\'navigateToMMMenuHome();\'>Home</a>'}]});"; 12 if (mmMenuScript && mmMenuScript.value) { 13 mmMenuScriptVal = mmMenuScript.value; 14 } 15 16 eval(mmMenuScriptVal); 17 18 var api = document.getElementById('menu').mmApi; 19 20 api.bind('open:start', function() { 21 jQuery_navigation("nav#menu").removeClass("hidden"); 22 }); 23 api.bind('open:finish', function() { 24 jQuery_navigation("div.humburger#mm-menu-link").addClass("active"); 25 }); 26 api.bind('close:finish', function() { 27 jQuery_navigation("nav#menu").addClass("hidden"); 28 jQuery_navigation("div.humburger#mm-menu-link").removeClass("active"); 29 }); 30 31 navigateToCurrentPage(); 32 33 jQuery_navigation("#mmMenuHomeLink").on('click', function(event) { 34 navigateToMMMenuHome(); 35 event.preventDefault(); 36 }); 37 38 } catch (err) { 39 console.log(err); 40 } 41 42 } 43 ); 44 45function navigateToCurrentPage() { 46 try { 47 var winLoc = window.location.href;
48 var navigateToLink = jQuery_navigation("#menu a[href='" + winLoc + "']"); 49 var navParentLinkLI = navigateToLink.parent(); 50 var navigationLinkUL = navParentLinkLI.parent(); 51 var navigationLinkDIV = navigationLinkUL.parent(); 52 var divId = jQuery_navigation(navigationLinkDIV).attr('id'); 53 var link = jQuery_navigation("#menu a[href='#" + divId + "']"); 54 var subMenuSpan = jQuery_navigation(link).find('span.mm-sronly'); 55 subMenuSpan.trigger('click'); 56 } catch (err) { 57 console.log(err); 58 } 59} 60 61function navigateToMMMenuHome() { 62 jQuery_navigation("#menu a[href='#mm-1']").find('span.mm-sronly').trigger('click'); 63 return; 64} 65 66function hideMMenu(hasChild){ 67 if(hasChild == 'false'){ 68 var api = document.getElementById('menu').mmApi; 69 api.close(); 70 }else{ 71 return; 72 } 73 74} 75 76 77jQuery_navigation(document).ready(function(){ 78 jQuery_navigation(window).resize(function(){ 79 var api = document.getElementById('menu').mmApi; 80 api.close(); 81 }); 82 });
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.