1var isTouch = Modernizr.touch, 2 isMobile = false, //åºåç§»å¨ç«¯ä¸PC端 3 mobile = false, //åºåææºç«¯ä¸å¹³æ¿ 4 w_width = 0, 5 w_height = 0, 6 bannerImgh = 638, 7 navItem = 0, 8 h_height = 0, 9 roll = 0, 10 sTop = 150, 11 produs = 0, 12 ST = 0; 13 14var _mousemove; 15var _click; 16var _mousedown; 17var _mouseup; 18 19//ç§»å¨ç«¯äºä»¶åPCäºä»¶ç忢 20if (Modernizr.touch) { 21 _mousemove = "touchmove"; 22 _click = "touchend"; 23 _mousedown = "touchstart"; 24 _mouseup = "touchend"; 25} else { 26 _mousemove = "mousemove"; 27 _click = "click"; 28 _mousedown = "mousedown"; 29 _mouseup = "mouseup"; 30}; 31 32function pageBox() { 33 w_width = jQuery(window).width(); 34 w_height = jQuery(window).height(); 35 36 37 //设置移å¨ç«¯åæ° 38 if (w_width <= 1024) { 39 isMobile = true; 40 } else if (w_width > 1024) { 41 isMobile = false; 42 }; 43 //åºåææºç«¯åå¹³æ¿ 44 if (w_width <= 640) { 45 mobile = true; 46 } else if (w_width > 640) { 47 mobile = false; 48 }; 49 $(".pbanners figure").height(w_height); 50 setImgMax($('.pbanners figure img'), 1920, 960, w_width, w_height); 51} 52pageBox(); 53jQuery(window).resize(function() { 54 pageBox(); 55}); 56 57 58var pageFn = { 59 init: function(){ 60 this.getScrollColor(); 61 this.getNavs(); 62 this.getFOcus(); 63 this.setInnerBanner(); 64 this.getHash(); 65 this.getScrollTop(); 66 this.loader(); 67 }, 68 loader: function(){ 69 70 }, 71 getNavs: function(){ 72 var indexs = $(".navs > li.active").index(); 73 var timer= null; 74 $(".navs > li").hover(function(){ 75 var $this = $(this); 76 $(this).addClass("active").siblings().removeClass("active"); 77 clearTimeout(timer); 78 timer = setTimeout(function(){ 79 $this.siblings().find(".navs-menu").stop().fadeOut(); 80 $this.find(".navs-menu").stop().fadeIn(); 81 },300) 82 },function(){ 83 clearTimeout(timer); 84 $(".navs-menu").stop().fadeOut(); 85 $(".navs > li").removeClass("active").eq(indexs).addClass("active"); 86 }); 87 88 //2级 89 $(".navs-left-list li").hover(function(){ 90 $(this).addClass("active").siblings().removeClass("active"); 91 $(this).parents(".navs-product").find(".navs-tab .product-menu").eq($(this).index()).show().siblings().hide(); 92 }); 93 94 $(".product-menu-list p").hover(function(){ 95 var dataSrc = $(this).attr("data-src"); 96 var dataTitle = $(this).attr("data-titles"); 97 var dataDesc = $(this).attr("data-desc"); 98 99 $(this).parents(".product-menu").find(".technology-imgs-list .technology-info figure img").attr("src", dataSrc); 100 $(this).parents(".product-menu").find(".technology-imgs-list .technology-info strong").text(dataTitle); 101 $(this).parents(".product-menu").find(".technology-imgs-list .technology-info p").text(dataDesc); 102 }); 103 104 $(".menubtn").click(function(){ 105 $(this).toggleClass("active"); 106 $(".menu-down").toggleClass("show"); 107 }); 108 109 $(".menu-list > li > a").click(function(){ 110 $(this).toggleClass("on"); 111 $(this).parents("li").find(".iphone-menu").stop().slideToggle(); 112 $(this).parents("li").siblings().find("a").removeClass("on"); 113 $(this).parents("li").siblings().find(".iphone-menu").stop().slideUp() 114 }) 115 }, 116 getScrollColor: function() { 117 function a(){ 118 var s = $(window).scrollTop(); 119 s > 30 ? $(".header").addClass('scroll'): $(".header").removeClass('scroll'); 120 s > 30 ? $(".scrollTop").fadeIn(): $(".scrollTop").fadeOut(); 121 } 122 $(window).scroll(a); 123 a(); 124 125 $(".scrollTop").click(function(){ 126 jQuery("html,body").animate({ scrollTop: 0},800); 127 }); 128 }, 129 getFOcus: function(e) { 130 $(".message-item .text").focus(function(){ 131 $(this).parents(".message-item").addClass("focusd"); 132 }); 133 $(".message-item .text").blur(function(){ 134 if($(this).val().length <= 0){ 135 $(this).parents(".message-item").removeClass("focusd"); 136 } 137 }); 138 139 $(document).ready(function() { 140 $('.radio-item input[type=radio]').change(function() { 141 $(this).parents(".radio-item").addClass("active").siblings().removeClass("active"); 142 }); 143 }); 144 }, 145 146 setInnerBanner: function() { 147 $("img.lazy").lazyload({ 148 effect: "fadeIn", 149 threshold: 10, 150 placeholder: "images/loading.gif" 151 }); 152 jQuery(window).scroll(function () { 153 var windowTop = jQuery(window).scrollTop(); 154 if (windowTop < w_height) { 155 jQuery('.pbanner figure img').css('transform', "translate(0px," + (windowTop) / 6 + "px)"); 156 }; 157 }); 158 if($(".ptext").length> 0){ 159 pban1 = new SplitText($('.ptext strong'), {type: "chars"}); 160 var s1 = new TimelineMax(); 161 s1.staggerFrom(pban1.chars, 0.8, {y: 260, ease: Expo.easeOut},0.05, 0.2); 162 } 163 164 }, 165 getHash: function() { 166 var hash = location.hash; 167 jQuery(".laval-menu-list li a").click(function(e){
168 var hash=jQuery(this).attr("href").split("#")[1]; 169 if(hash && jQuery("#"+hash).length==1){ 170 setScroll("#"+hash); 171 } 172 }); 173 function getHashs(){ 174 if(hash){ 175 setScroll(hash); 176 } 177 }; 178 var scnum=0; 179 function setScroll(anchorCur){ 180 if($(".manage").length > 0){ 181 return; 182 } 183 scnum=$('.header').outerHeight(); 184 jQuery("html,body").animate({ scrollTop: parseInt(jQuery(anchorCur).offset().top)},400); 185 }; 186 window.onload = function(){ 187 getHashs(); 188 } 189 // setTimeout(function(){ 190 // getHashs(); 191 // },50) 192 193 194 }, 195 getScrollTop: function(){ 196 $(".news-scolltop").click(function(){ 197 jQuery("html,body").animate({ scrollTop: 0},800); 198 }); 199 $(".pbanner__text .nMore").click(function(){ 200 jQuery("html,body").animate({ scrollTop: w_height},800); 201 }); 202 } 203} 204pageFn.init(); 205 206 207jQuery(window).load(function() { 208 jQuery('.article-block').delay(300).scrollClass(); 209});/* 210window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'https://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)]; 211(function(jQuery) { 212 $.fn.scrollClass = function(config) { 213 var defaults = {}; 214 var config = jQuery.extend(defaults, config); 215 var target = this; 216 217 function addAction() { 218 var length = target.length; 219 for (var i = 0; i < length; i++) { 220 if (target.eq(i).hasClass('articleShow')) continue; 221 222 var in_position = target.eq(i).offset().top + 100; 223 var window_bottom_position = jQuery(window).scrollTop() + jQuery(window).height(); 224 if (in_position < window_bottom_position) { 225 target.eq(i).addClass('articleShow'); 226 } 227 } 228 } 229 addAction(); 230 231 jQuery(window).on('scroll', function() { 232 addAction(); 233 }); 234 return target; 235 }; 236})(jQuery);*/ 237 238 239function setImgMax(img, imgW, imgH, tW, tH) { 240 var tWidth = tW || w_width; 241 var tHeight = tH || w_height; 242 var coe = imgH / imgW; 243 var coe2 = tHeight / tWidth; 244 if (coe < coe2) { 245 var imgWidth = tHeight / coe; 246 img.css({ 247 height: tHeight, 248 width: imgWidth, 249 left: -(imgWidth - tWidth) / 2, 250 top: 0 251 }); 252 } else { 253 var imgHeight = tWidth * coe; 254 img.css({ 255 height: imgHeight, 256 width: tWidth, 257 left: 0, 258 top: -(imgHeight - tHeight) / 2 259 }); 260 }; 261 262}; 263$(".leave-close").click(function(){ 264 $(".sage").removeClass("hide"); 265}); 266$(".sage-show").click(function(){ 267 $(".sage").addClass("hide"); 268}); 269 270 271 272 273document.addEventListener('DOMContentLoaded', function() { 274 // è·åææç<a>æ ç¾ 275 var links = document.querySelectorAll('.m-share-down a'); 276 277 // 为æ¯ä¸ª<a>æ ç¾èµå¼ 278 links[0].href = 'https://www.facebook.com/CDEBYTE/'; // Facebook 279 links[1].href = 'https://x.com/EBYTE18'; // Twitter 280 links[2].href = 'https://cdebyte.en.alibaba.com/'; // Alibaba 281 282 links[1].innerHTML = '<i class="iconfont"></i>X.com'; 283 284 links[0].target = '_blank'; 285 links[1].target = '_blank'; 286 links[2].target = '_blank'; 287 288 289}); 290 291
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.