1if (typeof $ != "undefined") { 2 ; 3 $(function() { 4 var width = $(window).width(); 5 var win = $(window); 6 var isIE = !!window.ActiveXObject; 7 var isIE6 = isIE && !window.XMLHttpRequest; 8 var isIE8 = isIE && !!document.documentMode; 9 var isIE7 = isIE && !isIE6 && !isIE8; 10 11 // funhead 12 if (width > 800) { 13 (function() { 14 var win = $(window); 15 var header = $("#header"); 16 if (header.length > 0 && header.hasClass("tofixed")) { 17 var headerTop = header.offset().top, 18 headerHeight = header.height(), 19 headerFixedTop = headerTop + headerHeight; 20 var headerWrap = $("#headerWrap"); 21 headerWrap.length > 0 ? function() { 22 headerWrap.height(headerHeight); 23 }() : 0; 24 win.on("load scroll resize", function() { 25 $(this).scrollTop() >= headerFixedTop ? function() { 26 !header.hasClass("header_fixed") ? header.addClass("header_fixed") : 27 0; 28 }() : function() { 29 header.removeClass("header_fixed") 30 }(); 31 if (isIE6) { 32 var scrollT = $(this).scrollTop(); 33 scrollT >= headerFixedTop ? function() { 34 header.css({ 35 "top": scrollT + "px" 36 });
37 }() : function() { 38 header.css({ 39 "top": "0px" 40 }); 41 }(); 42 }; 43 }); 44 }; 45 })(); 46 } 47 // end funhead 48 49 // ftool 50 (function() { 51 var ftool = $("#ftool"), 52 ftoolTop = $("#ftoolTop"); 53 ftoolTop.click(function(e) { 54 e.preventDefault(); 55 $("html,body").animate({ 56 scrollTop: 0 57 }, 500); 58 }); 59 $(window).on("DOMContentLoaded scroll resize", function() { 60 $(this).scrollTop() == 0 ? ftoolTop.stop(true, true).fadeOut() : ftoolTop.fadeIn(); 61 $(this).scrollTop() < 320 ? ftool.stop(true, true).fadeOut() : ftool.fadeIn(); 62 }); 63 // ie6 64 if (isIE6) { 65 $(window).scroll(function() { 66 $("#ftool").css({ 67 "top": $(this).scrollTop() + 200 68 }); 69 }); 70 }; 71 })(); 72 // end ftool 73 74 }); 75 76}; 77// end jq 78 79document.addEventListener("touchstart", function() {}, true); 80var $$ = document.querySelectorAll.bind(document); 81Element.prototype.on = Element.prototype.addEventListener; 82Element.prototype.off = Element.prototype.removeEventListener; 83var ForEach = function(array, fn) { 84 [].forEach.call(array, fn); 85}; 86 87function disableScroll(e) { 88 e.preventDefault(); 89} 90 91// slide 92if (typeof TouchSlide == "function") { 93 TouchSlide({ 94 slideCell: "#focusvideo", 95 mainCell: ".bd", 96 effect: "leftLoop", 97 autoPlay: true, 98 delayTime: 500, 99 interTime: 5000 100 }); 101}; 102// end slide 103 104 105 106document.addEventListener("DOMContentLoaded", function() { 107 108 109}); 110 111 112 113function callSidemenu() { 114 var $$html = document.querySelector("html"); 115 var sidemenu = document.getElementById("sidemenu"); 116 if ($$html.classList.contains("show_sidemenu")) { 117 $$html.classList.remove("show_sidemenu"); 118 $$html.off("touchmove", disableScroll); 119 } else { 120 $$html.classList.add("show_sidemenu"); 121 $$html.on("touchmove", disableScroll); 122 sidemenu ? sidemenu.on("touchmove", function(e) { 123 e.stopPropagation() 124 }) : 0; 125 } 126} 127 128function hideSidemenu() { 129 var $$html = document.querySelector("html"); 130 $$html.classList.remove("show_sidemenu"); 131 $$html.off("touchmove", disableScroll); 132} 133 134var width = $(window).width(); 135 $(function() { 136 $('#phone_show').click(function() { 137 $('.erji_show').slideToggle(); 138 }); 139 140 });
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.