1$(function(){ 2 if (typeof isFrontEnv === 'function') { 3 if(!isFrontEnv()){ 4 $('body').addClass('isFENV'); 5 } 6 } 7 if(!placeholderSupport()){ 8 $('[placeholder]').focus(function() { 9 var input = $(this); 10 if (input.val() == input.attr('placeholder')) { 11 input.val(''); 12 input.removeClass('placeholder'); 13 } 14 }).blur(function() { 15 var input = $(this); 16 if (input.val() == '' || input.val() == input.attr('placeholder')) { 17 input.addClass('placeholder'); 18 input.val(input.attr('placeholder')); 19 } 20 }).blur(); 21 }; 22 if(!IsPC()){$('body').addClass('touch_body')} 23 //ieæµè§å¨ 24 if(isIE()){$('html').addClass('isIe');} 25 // è·åå½åurl 26 var url_location = window.location.pathname; 27 var arr = []; 28 arr = url_location.split('/'); 29}) 30 31function placeholderSupport() { 32 return 'placeholder' in document.createElement('input'); 33} 34function scrollT($Dom){ 35 if($Dom.offset()){ 36 if($(window).scrollTop()+$(window).height()>=$Dom.offset().top+200){ 37 return true; 38 } 39 } 40} 41function mainBgResize1($img, width, height, W_b, H_b) { 42 var sw = width, 43 sh = width / W_b * H_b 44 if (sh < height) { 45 sh = height; 46 sw = height / H_b * W_b 47 } 48 $img.css({height:sh,width:sw, marginTop: -(sh - height) / 2, marginLeft: -(sw - width) / 2, 'visibility': 'visible' }); 49 50} 51//夿æ¯å¦Firefoxæµè§å¨ 52function isFirefox(){ 53 if (navigator.userAgent.indexOf("Firefox") > -1) 54 return true; 55 else 56 return false; 57} 58//夿æ¯å¦IEæµè§å¨ 59function isIE() { 60 if (!!window.ActiveXObject || "ActiveXObject" in window) 61 return true; 62 else 63 return false; 64} 65function IsPC() { 66 var userAgentInfo = navigator.userAgent; 67 var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); 68 var flag = true; 69 for (var v = 0; v < Agents.length; v++) { 70 if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } 71 } 72 return flag; 73} 74//ç»å®äºä»¶çå¬ 75function addEvent(eve,callback){ 76 if (window.attachEvent){ 77 window.attachEvent("on"+eve,callback); 78 }else if(window.addEventListener) { 79 window.addEventListener(eve,callback,false); 80 } 81} 82//夿pad横å±ç«å±ï¼å·æ°é¡µé¢ 83addEvent('load', function(){ 84 // orientationChange(); 85 window.onorientationchange = orientationChange; 86}); 87function orientationChange() { 88 switch(window.orientation) { 89ããcase 0: 90 //alert("è忍¡å¼ 0,screen-width: " + screen.width + "; screen-height:" + screen.height); 91 window.location.reload(); 92 break; 93ããcase -90: 94 //alert("å·¦æ -90,screen-width: " + screen.width + "; screen-height:" + screen.height); 95 window.location.reload(); 96 break; 97ããcase 90: 98 // alert("峿 90,screen-width: " + screen.width + "; screen-height:" + screen.height); 99 window.location.reload(); 100 break; 101ããcase 180: 102 ãã//alert("飿¯æ¨¡å¼ 180,screen-width: " + screen.width + "; screen-height:" + screen.height); 103 window.location.reload(); 104 ããbreak; 105 } 106}; 107//è·åIEæµè§å¨çæ¬ 108function getBrowserVersion(){ 109 var hc = $('html').attr('class'); 110 if(hc){ 111 var ieVersion = hc && hc.split(' ')[1]; 112 if(ieVersion){ 113 $('.browserupgrade>strong').text(ieVersion.toUpperCase()); 114 } 115 } 116} 117getBrowserVersion(); 118//é¼ æ å»¶è¿æ§è¡äºä»¶æ¹æ³ 119$.fn.hoverDelay = function(options){ 120 var defaults = { 121 hoverDuring: 200, 122 outDuring: 200, 123 hoverEvent: function(){ 124 $.noop(); 125 }, 126 outEvent: function(){ 127 $.noop(); 128 } 129 }; 130 var sets = $.extend(defaults,options || {}); 131 var hoverTimer, outTimer, that = this; 132 return $(this).each(function(){ 133 $(this).on('mouseenter',function(){ 134 clearTimeout(outTimer); 135 hoverTimer = setTimeout(function(){sets.hoverEvent.apply(that)}, sets.hoverDuring); 136 }); 137 $(this).on('mouseleave',function(){ 138 clearTimeout(hoverTimer); 139 outTimer = setTimeout(function(){sets.outEvent.apply(that)}, sets.outDuring); 140 }); 141 }); 142} 143
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.