$(function() { }); $(window).scroll(function() { if ($(window).scrollTop() > 93) { $('header').addClass('nav_on') } else { $('header').removeClass('nav_on') } }); // 监听鼠标滚轮上下 $(document).on("mousewheel DOMMouseScroll", function (e) { var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie (e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox if (delta > 0) { // 向上滚 $('header').removeClass('nav3_none'); $('.division_tab').addClass('nav2_none'); } else if (delta < 0) { // 向下滚 $('header').addClass('nav3_none'); $('.division_tab').removeClass('nav2_none'); } }); // 滚动导航 function HiScrollNav(sClass, obj1, obj2, obj3,obj4) { // 设置减去元素的高度 var obj3Height = 0; var obj4Height = 0; if (obj3.length != 0) { obj3Height = obj3.outerHeight(); } if (obj4.length != 0) { obj4Height = obj4.outerHeight(); } // 点击定位 obj1.each(function() { $(this).click(function() { $("html,body").animate({ "scrollTop": obj2.eq($(this).index()).offset().top - obj3Height + 1 }, 500); }); }); // 滚动定位 $(window).scroll(function() { hiDefault(); // console.log(obj1.eq($(this).index())) }); // 默认 function hiDefault() { obj2.each(function() { if ($(window).scrollTop() >= $(this).offset().top - obj3Height) { obj1.eq($(this).index()).addClass(sClass).siblings().removeClass(sClass); } }); } hiDefault(); } function xxkc(x_id,dj){ $(x_id).hide(); $(x_id).eq(0).show(); $(dj).click(function(){ $(this).addClass('on').siblings().removeClass('on'); $(x_id).hide(); $(x_id).eq($(this).index()).show(); }) } // window mac切换字体 function OSnow(){ var agent = navigator.userAgent.toLowerCase(); var isMac = /macintosh|mac os x/i.test(navigator.userAgent); if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) { $('body').css('font-family','Calibri,CN-Regular,微软雅黑') } if(isMac){ $('body').css('font-family','PingFangSC-Regular, sans-serif') } } OSnow(); // IE10以下浏览器提示 function hiUpgrade() { window.AESKey = ''; // 判断浏览器是否支持placeholder属性 function isSupportPlaceholder() { var input = document.createElement('input'); return 'placeholder' in input; }; //判断是否是IE浏览器,包括Edge浏览器 function IEVersion() { //取得浏览器的userAgent字符串 var userAgent = navigator.userAgent; //判断是否IE浏览器 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; if (isIE) { // ie10及以下 var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if (fIEVersion < 10 || !isSupportPlaceholder()) { return true; } } else { return false; } } var tpl = '

无法正常浏览本网站!

继续浏览

1、您的浏览器版本过低,请升级您的浏览器。

2、如果您的浏览器是最新版本,请切换到极速模式访问。

3、您使用的是IE10以下的浏览器,建议您使用主流浏览器访问。

主流浏览器下载

'; if (IEVersion()) { document.write(tpl); } } hiUpgrade(); // 使用IE浏览器提示 // function hiUpgrade() { // window.AESKey = ''; // // 判断浏览器是否支持placeholder属性 // function isSupportPlaceholder() { // var input = document.createElement('input'); // return 'placeholder' in input; // }; // //判断是否是IE浏览器,包括Edge浏览器 // function IEVersion() { // //取得浏览器的userAgent字符串 // var userAgent = navigator.userAgent; // //判断是否IE浏览器 // var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; // if (isIE) { // // ie10及以下 // var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); // reIE.test(userAgent); // var fIEVersion = parseFloat(RegExp["$1"]); // if (fIEVersion <= 10 || !isSupportPlaceholder()) { // return true; // } // } else if (!!window.ActiveXObject || "ActiveXObject" in window) { // // ie11 // return true; // } else { // return false; // } // } // var tpl = '

无法正常浏览本网站!

继续浏览

1、您的浏览器版本过低,请升级您的浏览器。

2、如果您的浏览器是最新版本,请切换到极速模式访问。

3、您使用的是IE浏览器,请使用主流浏览器访问。

主流浏览器下载

'; // if (IEVersion()) { // document.write(tpl); // } // } // hiUpgrade(); //wow (function() { var a, b, c = function(a, b) { return function() { return a.apply(b, arguments) } }; a = function() { function a() {} return a.prototype.extend = function(a, b) { var c, d; for(c in a) d = a[c], null != d && (b[c] = d); return b }, a.prototype.isMobile = function(a) { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a) }, a }(), b = this.WeakMap || (b = function() { function a() { this.keys = [], this.values = [] } return a.prototype.get = function(a) { var b, c, d, e, f; for(f = this.keys, b = d = 0, e = f.length; e > d; b = ++d) if(c = f[b], c === a) return this.values[b] }, a.prototype.set = function(a, b) { var c, d, e, f, g; for(g = this.keys, c = e = 0, f = g.length; f > e; c = ++e) if(d = g[c], d === a) return void(this.values[c] = b); return this.keys.push(a), this.values.push(b) }, a }()), this.WOW = function() { function d(a) { null == a && (a = {}), this.scrollCallback = c(this.scrollCallback, this), this.scrollHandler = c(this.scrollHandler, this), this.start = c(this.start, this), this.scrolled = !0, this.config = this.util().extend(a, this.defaults), this.animationNameCache = new b } return d.prototype.defaults = { boxClass: "wow", animateClass: "animated", offset: 0, mobile: !0 }, d.prototype.init = function() { var a; return this.element = window.document.documentElement, "interactive" === (a = document.readyState) || "complete" === a ? this.start() : document.addEventListener("DOMContentLoaded", this.start) }, d.prototype.start = function() { var a, b, c, d; if(this.boxes = this.element.getElementsByClassName(this.config.boxClass), this.boxes.length) { if(this.disabled()) return this.resetStyle(); for(d = this.boxes, b = 0, c = d.length; c > b; b++) a = d[b], this.applyStyle(a, !0); return window.addEventListener("scroll", this.scrollHandler, !1), window.addEventListener("resize", this.scrollHandler, !1), this.interval = setInterval(this.scrollCallback, 50) } }, d.prototype.stop = function() { return window.removeEventListener("scroll", this.scrollHandler, !1), window.removeEventListener("resize", this.scrollHandler, !1), null != this.interval ? clearInterval(this.interval) : void 0 }, d.prototype.show = function(a) { return this.applyStyle(a), a.className = "" + a.className + " " + this.config.animateClass }, d.prototype.applyStyle = function(a, b) { var c, d, e; return d = a.getAttribute("data-wow-duration"), c = a.getAttribute("data-wow-delay"), e = a.getAttribute("data-wow-iteration"), this.animate(function(f) { return function() { return f.customStyle(a, b, d, c, e) } }(this)) }, d.prototype.animate = function() { return "requestAnimationFrame" in window ? function(a) { return window.requestAnimationFrame(a) } : function(a) { return a() } }(), d.prototype.resetStyle = function() { var a, b, c, d, e; for(d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], e.push(a.setAttribute("style", "visibility: visible;")); return e }, d.prototype.customStyle = function(a, b, c, d, e) { return b && this.cacheAnimationName(a), a.style.visibility = b ? "hidden" : "visible", c && this.vendorSet(a.style, { animationDuration: c }), d && this.vendorSet(a.style, { animationDelay: d }), e && this.vendorSet(a.style, { animationIterationCount: e }), this.vendorSet(a.style, { animationName: b ? "none" : this.cachedAnimationName(a) }), a }, d.prototype.vendors = ["moz", "webkit"], d.prototype.vendorSet = function(a, b) { var c, d, e, f; f = []; for(c in b) d = b[c], a["" + c] = d, f.push(function() { var b, f, g, h; for(g = this.vendors, h = [], b = 0, f = g.length; f > b; b++) e = g[b], h.push(a["" + e + c.charAt(0).toUpperCase() + c.substr(1)] = d); return h }.call(this)); return f }, d.prototype.vendorCSS = function(a, b) { var c, d, e, f, g, h; for(d = window.getComputedStyle(a), c = d.getPropertyCSSValue(b), h = this.vendors, f = 0, g = h.length; g > f; f++) e = h[f], c = c || d.getPropertyCSSValue("-" + e + "-" + b); return c }, d.prototype.animationName = function(a) { var b; try { b = this.vendorCSS(a, "animation-name").cssText } catch(c) { b = window.getComputedStyle(a).getPropertyValue("animation-name") } return "none" === b ? "" : b }, d.prototype.cacheAnimationName = function(a) { return this.animationNameCache.set(a, this.animationName(a)) }, d.prototype.cachedAnimationName = function(a) { return this.animationNameCache.get(a) }, d.prototype.scrollHandler = function() { return this.scrolled = !0 }, d.prototype.scrollCallback = function() { var a; return this.scrolled && (this.scrolled = !1, this.boxes = function() { var b, c, d, e; for(d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], a && (this.isVisible(a) ? this.show(a) : e.push(a)); return e }.call(this), !this.boxes.length) ? this.stop() : void 0 }, d.prototype.offsetTop = function(a) { for(var b; void 0 === a.offsetTop;) a = a.parentNode; for(b = a.offsetTop; a = a.offsetParent;) b += a.offsetTop; return b }, d.prototype.isVisible = function(a) { var b, c, d, e, f; return c = a.getAttribute("data-wow-offset") || this.config.offset, f = window.pageYOffset, e = f + this.element.clientHeight - c, d = this.offsetTop(a), b = d + a.clientHeight, e >= d && b >= f }, d.prototype.util = function() { return this._util || (this._util = new a) }, d.prototype.disabled = function() { return !this.config.mobile && this.util().isMobile(navigator.userAgent) }, d }() }).call(this); var wow = new WOW({ boxClass:'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); wow.init();