1/*åç*/ 2const body = document.body; 3const _top = 0; 4 5var isTouch = !!('ontouchstart' in document.documentElement) || !!('onmsgesturestart' in document.documentElement); 6var events = {click: 'click',fastClick: isTouch ? 'touchend' : 'click'}; 7 8 9document.getElementById("m_menu").addEventListener(events.fastClick,function(e){ 10 document.querySelector(".nav_panel").classList.add("open"); 11},false); 12 13 14var m_menu_close = document.getElementById("m_menu_close"); 15if(m_menu_close){ 16 document.getElementById("m_menu_close").addEventListener(events.fastClick,function(e){ 17 document.querySelector(".nav_panel").classList.remove("open"); //å 18 body.classList.remove('off_canvas_active'); //å é¤ä¸ä¸ªåéæé®ç½© 19 },false); 20} 21 22var m_panel = document.getElementById("m_panel"); 23if(m_panel){ 24document.getElementById("m_panel").addEventListener(events.fastClick,function(e){ 25 document.querySelector(".more_panel").classList.add("open"); 26 body.classList.add('off_canvas_active'); 27 28},false); 29} 30 31var m_panel_close = document.getElementById("m_panel_close"); 32if(m_panel_close){ 33 document.getElementById("m_panel_close").addEventListener(events.fastClick,function(e){ 34 document.querySelector(".more_panel").classList.remove("open"); 35 body.classList.remove('off_canvas_active'); 36 },false); 37} 38 39function sticky(){ 40 var sticky_wrapper = document.getElementById("sticky_wrapper"); 41 var stickydata = document.getElementById("sticky_nav"); 42 43 var stickytop = stickydata.offsetTop; 44 var stickyhei = stickydata.offsetHeight; 45 46 47 window.onscroll = function(){ 48 var t=document.documentElement.scrollTop||document.body.scrollTop; 49 if(window.innerWidth < 992){ 50 if(t >= stickyhei){ 51 stickydata.classList.add("head_sticky"); 52 sticky_wrapper.style.height = stickyhei + 'px'; 53 }else{ 54 stickydata.classList.remove("head_sticky"); 55 sticky_wrapper.style.height = 'auto'; 56 } 57 }else{ 58 if(t >= stickytop){ 59 60 if(stickydata.classList.contains("sticky-transparent") == false){ 61 sticky_wrapper.style.height = stickyhei + 'px'; 62 } 63 stickydata.classList.add("head_sticky"); 64 }else{ 65 stickydata.classList.remove("head_sticky"); 66 sticky_wrapper.style.height = 'auto'; 67 } 68 } 69 } 70 71}; 72sticky(); 73 74var dropdown_toggle=document.querySelector(".dropdown_toggle"); 75if(dropdown_toggle){ 76document.querySelector(".dropdown_toggle").addEventListener(events.fastClick,function(e){ 77 this.classList.toggle("open"); 78},false); 79} 80 81 82var m_menu = body.querySelector(".m_menu"); 83var dropdown_plus = m_menu.querySelectorAll(".dropdown-plus"); 84if(dropdown_plus){ 85 dropdown_plus.forEach((item) => { 86 item.addEventListener(events.fastClick,function(e){ 87 item.parentNode.classList.toggle("open"); 88 }); 89 }); 90}
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.