1var navigationDictionary={}; 2var navigationKeys=[]; 3// allows for a sort of Dictionary keys so we can search 4// from smallest to largest 5var logoDictionary = {}; 6// allows for a sort of logoKeys so we can search 7// from smallest to largest 8var logoKeys= []; 9 10function setNavigation() 11{ 12 var windowWidth = $(window).width(); 13 var navLen = navigationKeys.length; 14 var navAvailable =false; // 15 var nav; 16 $('.custom-navigation').addClass('hideNav'); 17 // checks for a nav that is smaller than the current window size 18 // if no nav is small enough setNavigation() will default to the biggest 19 // navigation that the user has set. 20 for (var j in navigationKeys) 21 { 22 if (windowWidth <= navigationKeys[j]) 23 { 24 navAvailable = true; 25 nav = navigationDictionary[navigationKeys[j]]; 26 break; 27 } 28 } 29 30 if (navAvailable) 31 { 32 $(nav).removeClass('hideNav'); 33 } 34 35 else 36 { 37 // largest nav is found in the last index in the dictionary 38 $(navigationDictionary[navigationKeys[navLen-1]]).removeClass('hideNav'); 39 } 40} 41function windowResize(){ 42 if ($(window).width() >= 768){ 43 $(".menu-item-a").removeClass("btn btn-design dropdown").removeAttr("data-toggle"); 44 } 45 46 else { 47 $(".menu-item-a").addClass("btn btn-design "); 48 $(".dropdown-owner").addClass("dropdown").attr("data-toggle","dropdown"); 49 } 50} 51 52function setLogo() 53{ 54 var windowWidth = $(window).width(); 55 var len = logoKeys.length; 56 var logoAvailable =false; // 57 var logo; 58 // checks for a nav that is smaller than the current window size 59 // if no nav is small enough setNavigation() will default to the biggest 60 // navigation that the user has set. 61 for (var j in logoKeys) 62 { 63 if (windowWidth <= logoKeys[j]) 64 { 65 logoAvailable = true; 66 logo = logoDictionary[logoKeys[j]]; 67 break; 68 } 69 } 70 71 if (logoAvailable) 72 { 73 $("#navbarLogo img").attr("src", logo ); 74 } 75 76 else 77 { 78 // largest logo is found in the last index in the dictionary 79 $("#navbarLogo img").attr("src", logoDictionary[logoKeys[len-1]] ); 80 } 81}
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.