1var jQuery_navigation = jQuery.noConflict(true); 2jQuery_navigation(document).ready(function($) { 3 4 jQuery_navigation("ul.smartphone-nav-ul").css("display", ""); 5 6 try { 7 var mmMenuScript = document.getElementById('mmMenuScript'); 8 var mmMenuScriptVal = "$('#menu').mmenu({'navbars': [{'position': 'bottom','content':'<a href=\'#\' id=\'mmMenuHomeLink\' onClick=\'navigateToMMMenuHome();\'>Home</a>'}]});"; 9 if (mmMenuScript && mmMenuScript.value) { 10 mmMenuScriptVal = mmMenuScript.value; 11 } 12 eval(mmMenuScriptVal); 13 14 //bind init method for navigating to the current page 15 var api = jQuery_navigation('#menu').data( "mmenu" ); 16 api.bind ('opened', function () { 17 jQuery_navigation("div.humburger#mm-menu-link").addClass("active"); 18 }); 19 api.bind ('closed', function () { 20 jQuery_navigation("div.humburger#mm-menu-link").removeClass("active"); 21 }); 22 api.bind( "init", function( $panel ) { 23 navigateToCurrentPage(); 24 addHrefToMMMenuTitle(); 25 }); 26 27 api.init(jQuery_navigation("#my-panel") ); 28 29 function addHrefToMMMenuTitle() { 30 var $titles = jQuery_navigation(".mm-title"); 31 if ($titles !== undefined) { 32 $titles.each(function() { 33 var $title = jQuery_navigation(this); 34 if (!$title.attr("href")) { 35 $title.attr("href", "#"); 36 } 37 }); 38 } 39 } 40 41 } 42 catch(err) { 43 console.log(err); 44 } 45 46}); 47 48 49function navigateToCurrentPage() { 50 51 try { 52 var winLoc = window.location.href;
53 var navigateToLink = jQuery_navigation("#menu a[href='"+winLoc+"']"); 54 var navParentLinkLI = navigateToLink.parent(); 55 var navigationLinkUL = navParentLinkLI.parent(); 56 var navigationLinkDIV = navigationLinkUL.parent(); 57 var divId = jQuery_navigation(navigationLinkDIV).attr('id'); 58 var link = jQuery_navigation("#menu a[data-target='#"+divId+"']"); 59 link.trigger('click'); 60 } 61 catch(err) { 62 console.log(err); 63 } 64} 65 66function navigateToMMMenuHome() { 67 68 jQuery_navigation("#menu a[data-target='#mm-1']").trigger('click'); 69} 70
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.