$(function () { // 事件集合 function toggleNav(_parent, _clickDom, _subnav, _navLI, _subnavA) { $(_parent).off('click').on('click', _clickDom, function () { if ($(this).parent('h3').siblings(_subnav).is(':hidden')) { $(this).parent('h3').siblings(_subnav).stop(true, true).slideDown(300); $(this).parents('li').addClass('active').siblings().removeClass('active').find(_subnav).stop(true, true).slideUp(300); } else { $(this).parents('li').removeClass('active').find('h3').siblings(_subnav).stop(true, true).slideUp(300); } }); $(_navLI).each(function () { if (!$(this).find(_subnavA).length) { $(this).find('h3 i').hide(); } }); }; // 回到顶部 // 返回顶部 $(window).scroll(function () { var _scrTop = $(window).scrollTop(); // less winScroll(); if (_scrTop > 400) { $('.back-top').fadeIn(); } else { $('.back-top').fadeOut(); }; }); $('.back-top').on('click', function () { $('html,body').stop().animate({ 'scrollTop': 0 }, 500); }); // 产品详情-选项卡切换 $('.pro-detail-tab').off('click').on('click', 'li', function () { $(this).addClass('cur').siblings().removeClass('cur'); $('.pro-content-item').eq($(this).index()).stop(true, true).fadeIn(300).siblings().hide(); }).find('li').each(function () { if ($(this).hasClass('cur')) { $('.pro-content-item').eq($(this).index()).stop(true, true).fadeIn(300); } }); // 服务与支持-服务网点 $('.services-network').off('click').on('click', 'li', function () { if ($(this).find('.services-network-info').is(':hidden')) { $(this).addClass('cur').find('.d-address').stop(true, true).slideUp(300).siblings('.services-network-info').stop(true, true).slideDown(300); $(this).siblings().removeClass('cur').find('.d-address').stop(true, true).slideDown(300).siblings('.services-network-info').stop(true, true).slideUp(300); } else { $(this).removeClass('cur').find('.d-address').stop(true, true).slideDown(300).siblings('.services-network-info').stop(true, true).slideUp(300); } }); // 常见问题带搜索按钮 $('.public-title-search').off('click').on('click', '.public-title-search-toggle', function () { if ($('.public-title-form').is(':hidden')) { $('.public-title-form').stop(true, true).slideDown(300); } else { $('.public-title-form').stop(true, true).slideUp(300); } }); //animated初始化 if (typeof WOW != 'undefined') { var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); wow.init(); } //轮播图集合 if (typeof Swiper != 'undefined') { //首页banner var inBanSW = new Swiper('.inbanner-swiper', { speed: 1200, autoplayDisableOnInteraction: false, watchOverflow: true, simulateTouch: false, autoplay: 4000, pagination: '.inban-page', prevButton: '.inban-prev', nextButton: '.inban-next', loop: true, paginationClickable: true, parallax: true, onInit: function (swiper) { wow.init(); $('.inbanner-swiper .swiper-slide-active').find('.fadebox').addClass('fadeInUp'); if ($('.inbanner-swiper').find('.swiper-slide').length < 2) { $('.inban-prev,.inban-next,.inban-page').hide(); } }, onTransitionStart: function (swiper) { $('.inbanner-swiper .swiper-slide-active').find('.fadebox').addClass('fadeInUp'); $('.inbanner-swiper .swiper-slide-active').siblings().find('.fadebox').removeClass('fadeInUp'); } }); //内页banner var sideBanSW = new Swiper('.side-banner-swiper', { speed: 1200, autoplayDisableOnInteraction: false, watchOverflow: true, simulateTouch: false, autoplay: 4500, pagination: '.side-banner-page', paginationClickable: true, effect : 'fade', onInit: function (swiper) { if ($('.side-banner-swiper').find('.swiper-slide').length < 2) { $('.side-banner-page').hide(); } } }); //首页方案轮播 var inprogrammeSW = new Swiper('.inprogrammer-swiper', { speed: 1200, simulateTouch: false, pagination: '.inprogrammer-page', slidesPerView: 3, breakpoints: { 768: { slidesPerView: 1 }, 1024: { slidesPerView: 2 } } }); //首页案例展示 var incaseSW = new Swiper('.incase-swiper', { speed: 1200, simulateTouch: false, slidesPerView: 2.06, spaceBetween: 47, centeredSlides: true, loop: true, loopAdditionalSlides: 1, prevButton: '.incase-prev', nextButton: '.incase-next', pagination: '.incase-page', breakpoints: { 1024: { slidesPerView: 1, spaceBetween: 10 }, 1460: { slidesPerView: 1.5, spaceBetween: 25 }, 1660: { slidesPerView: 1.8, spaceBetween: 25 } }, onInit: function (swiper) { if ($(window).width() > 1200) { var _activeW = $('.incase-box .swiper-slide-active').width() + 94 } else if ($(window).width() > 1024) { var _activeW = $('.incase-box .swiper-slide-active').width() + 50 } else { var _activeW = $('.incase-box .swiper-slide-active').width() + 20 } var _swiperBtnW = ($('.incase-box').width() - _activeW) / 2 // $('.incase-prev,.incase-next').css('width', _swiperBtnW) $('.incase-prev,.incase-next').css({ 'width': _swiperBtnW }); } }); //产品详情-商品图 var prodetailSW = new Swiper('.pro-detail-swiper', { speed: 1200, autoplayDisableOnInteraction: false, watchOverflow: true, simulateTouch: false, pagination: '.pro-detail-page', prevButton: '.pro-detail-prev', nextButton: '.pro-detail-next', paginationClickable: true, onInit: function (swiper) { if ($('.pro-detail-swiper').find('.swiper-slide').length < 2) { $('.pro-detail-prev,.pro-detail-next,.pro-detail-page').hide(); } } }); //产品详情-解决方案 var prosolutionSW = new Swiper('.pro-solution-swiper', { speed: 1200, autoplayDisableOnInteraction: false, watchOverflow: true, simulateTouch: false, pagination: '.pro-solution-page', prevButton: '.pro-solution-prev', nextButton: '.pro-solution-next', spaceBetween: 13, slidesPerView: 4, paginationClickable: true, onInit: function (swiper) { if ($('.pro-solution-swiper').find('.swiper-slide').length < 2) { $('.pro-solution-prev,.pro-solution-next,.pro-solution-page').hide(); } }, breakpoints: { 768: { slidesPerView: 1 }, 1024: { slidesPerView: 2 }, 1200: { slidesPerView: 3 } } }); //产品详情-相关产品推荐 var prosolutionSW = new Swiper('.pro-recommend-swiper', { speed: 1200, autoplayDisableOnInteraction: false, watchOverflow: true, simulateTouch: false, pagination: '.pro-recommend-page', prevButton: '.pro-recommend-prev', nextButton: '.pro-recommend-next', spaceBetween: 13, slidesPerView: 4, paginationClickable: true, onInit: function (swiper) { if ($('.pro-recommend-swiper').find('.swiper-slide').length < 2) { $('.pro-recommend-prev,.pro-recommend-next,.pro-recommend-page').hide(); } }, breakpoints: { 768: { slidesPerView: 1 }, 1024: { slidesPerView: 2 }, 1200: { slidesPerView: 3 } } }); //Ok138大阳城集团娱乐平台文化 var cultureSW = new Swiper('.culture-swiper', { speed: 1200, pagination: '.culture-page', prevButton: '.culture-prev', nextButton: '.culture-next', spaceBetween: 0, observer: true, observeParents: true, grabCursor: true, slidesPerView: 1.224, loop: true, loopAdditionalSlides: 1, breakpoints: { 1023: { spaceBetween: 5, slidesPerView: 1, } } }); //解决方案详情-方案优势 var solutionDetailSW = new Swiper('.solution-detail-swiper', { speed: 1200, simulateTouch: false, spaceBetween: 54, slidesPerView: 4, pagination: '.solution-detail-page', prevButton: '.solution-detail-prev', nextButton: '.solution-detail-next', breakpoints: { 768: { spaceBetween: 10, slidesPerView: 2 }, 1024: { spaceBetween: 20, slidesPerView: 3 }, 1200: { spaceBetween: 35, slidesPerView: 4 }, }, onInit: function (swiper) { if ($('.solution-detail-swiper').find('.swiper-slide').length > 4) { $('.solution-detail-prev,.solution-detail-next').show(); } } }); // 解决方案详情-方案应用 var solutionApplicationSW = new Swiper('.solution-application-swiper', { observer: true, centeredSlides: true, observeParents: true, watchSlidesProgress: true, watchSlidesVisibility: true, prevButton: '.application-prev', nextButton: '.application-next', slidesPerView: 'auto', // TODO: 样式设置 slide的宽度 loop: true, loopedSlides: 3, breakpoints: { // 注: slidesPerView 可为小数,两边截取 1200: { slidesPerView: 1.7, }, 1023: { slidesPerView: 1.8, }, 640: { slidesPerView: 1.26, }, }, onProgress: function (swiper) { var _stepTranslate = 0; // default:0,切换通过 swiper-wrapper偏移 var _stepScale = 1; // default:1, 不缩放 var _scaleFactor = 1; // 分母 var rec3d_w = $('.solution-application-swiper').width(); if ($(window).width() > 1200) { if (swiper.currentBreakpoint === 'max') { // pc | click // 调整显示两端修改 870 这个值 _stepTranslate = (450 * 3 - 870) / 2 / 2; _scaleFactor = 1 / (1 - (300 / 450)); // 1 - 1/? = 447 / 700 TODO: clientWidth/orginwidth } else { // mobole | touch length:default = 3 TODO: 手机端默认三个,缩放比例由 slidesPerView 决定 console.log(2) _stepScale = (3 - swiper.params.slidesPerView) / 2; _scaleFactor = 1 / (1 - _stepScale); // 显示中间部分 // _stepTranslate = (rec3d_w * 3 / swiper.params.slidesPerView - rec3d_w) / 4; // 默认左右两边显示一半 // 显示两端部分 _stepTranslate = _stepScale * rec3d_w - (rec3d_w / swiper.params.slidesPerView) * (swiper.params.slidesPerView - 1) / 2; // 默认左右两边显示一半 } } else { if (swiper.currentBreakpoint === 'max') { // pc | click _stepTranslate = (450 * 3 - 1000) / 2 / 2; _scaleFactor = 1 / (1 - (267 / 450)); // 1 - 1/? = 447 / 700 TODO: clientWidth/orginwidth } else { // mobole | touch length:default = 3 TODO: 手机端默认三个,缩放比例由 slidesPerView 决定 _stepScale = (3 - swiper.params.slidesPerView) / 2; _scaleFactor = 1 / (1 - _stepScale); // 显示中间部分 _stepTranslate = (rec3d_w * 3 / swiper.params.slidesPerView - rec3d_w) / 4; // 默认左右两边显示一半 // 显示两端部分 // _stepTranslate = _stepScale * rec3d_w - (rec3d_w / swiper.params.slidesPerView) * (swiper.params.slidesPerView - 1) / 2; // 默认左右两边显示一半 } } console.log(1); _stepTranslate = _stepTranslate || 225; // 计算 1/4 for (i = 0; i < swiper.slides.length; i++) { var slide = swiper.slides.eq(i); var slideProgress = swiper.slides[i].progress; modify = 1; if (Math.abs(slideProgress) > 1) { modify = (Math.abs(slideProgress) - 1) * 0.3 + 1; } translate = slideProgress * modify * _stepTranslate + 'px'; // 偏移: (orginwidth*3 - containerWidth)/2/2 scale = 1 - Math.abs(slideProgress) / _scaleFactor; // 缩放比例阶梯: (clientWidth/orginWidth); 1 64 28 step = 36 zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); if (Math.abs(slideProgress) > 3) { slide.css('opacity', 0); } } }, onSetTransition: function (swiper, transition) { for (var i = 0; i < swiper.slides.length; i++) { var slide = swiper.slides.eq(i); slide.transition(transition); } } }); //解决方案详情-核心产品 var coreSW = new Swiper('.core-swiper', { speed: 1200, simulateTouch: false, spaceBetween: 75, slidesPerView: 3, pagination: '.core-page', prevButton: '.core-prev', nextButton: '.core-next', breakpoints: { 768: { spaceBetween: 15, slidesPerView: 1 }, 1024: { spaceBetween: 30, slidesPerView: 2 }, 1400: { spaceBetween: 50, slidesPerView: 3 }, }, onInit: function (swiper) { if ($('.core-swiper').find('.swiper-slide').length > 3) { $('.core-prev,.core-next').show(); } } }); //解决方案详情-方案应用2 var solutionApplication2SW = new Swiper('.solution-application2-swiper', { speed: 1200, simulateTouch: false, spaceBetween: 5, pagination: '.application2-page', prevButton: '.application2-prev', nextButton: '.application2-next', }); // 关于Ok138大阳城集团娱乐平台-公益行动 var welfareSW = new Swiper('.welfare-swiper', { observer: true, centeredSlides: true, observeParents: true, watchSlidesProgress: true, watchSlidesVisibility: true, prevButton: '.welfare-prev', nextButton: '.welfare-next', slidesPerView: 'auto', // TODO: 样式设置 slide的宽度 loop: true, loopedSlides: 3, breakpoints: { // 注: slidesPerView 可为小数,两边截取 1200: { slidesPerView: 1.7, }, 1023: { slidesPerView: 1.8, }, 640: { slidesPerView: 1.26, }, }, onProgress: function (swiper) { var _stepTranslate = 0; // default:0,切换通过 swiper-wrapper偏移 var _stepScale = 1; // default:1, 不缩放 var _scaleFactor = 1; // 分母 var rec3d_w = $('.welfare-swiper').width(); if ($(window).width() > 1200) { if (swiper.currentBreakpoint === 'max') { // pc | click _stepTranslate = (800 * 3 - 600) / 2 / 2; _scaleFactor = 1 / (1 - (500 / 800)); // 1 - 1/? = 447 / 700 TODO: clientWidth/orginwidth } else { // mobole | touch length:default = 3 TODO: 手机端默认三个,缩放比例由 slidesPerView 决定 _stepScale = (3 - swiper.params.slidesPerView) / 2; _scaleFactor = 1 / (1 - _stepScale); // 显示中间部分 // _stepTranslate = (rec3d_w * 3 / swiper.params.slidesPerView - rec3d_w) / 4; // 默认左右两边显示一半 // 显示两端部分 _stepTranslate = _stepScale * rec3d_w - (rec3d_w / swiper.params.slidesPerView) * (swiper.params.slidesPerView - 1) / 2; // 默认左右两边显示一半 } } else { if (swiper.currentBreakpoint === 'max') { // pc | click _stepTranslate = (800 * 3 - 1200) / 2 / 2; _scaleFactor = 1 / (1 - (500 / 800)); // 1 - 1/? = 447 / 700 TODO: clientWidth/orginwidth } else { // mobole | touch length:default = 3 TODO: 手机端默认三个,缩放比例由 slidesPerView 决定 _stepScale = (3 - swiper.params.slidesPerView) / 2; _scaleFactor = 1 / (1 - _stepScale); // 显示中间部分 _stepTranslate = (rec3d_w * 3 / swiper.params.slidesPerView - rec3d_w) / 4; // 默认左右两边显示一半 // 显示两端部分 // _stepTranslate = _stepScale * rec3d_w - (rec3d_w / swiper.params.slidesPerView) * (swiper.params.slidesPerView - 1) / 2; // 默认左右两边显示一半 } } _stepTranslate = _stepTranslate || 225; // 计算 1/4 for (i = 0; i < swiper.slides.length; i++) { var slide = swiper.slides.eq(i); var slideProgress = swiper.slides[i].progress; modify = 1; if (Math.abs(slideProgress) > 1) { modify = (Math.abs(slideProgress) - 1) * 0.3 + 1; } translate = slideProgress * modify * _stepTranslate + 'px'; // 偏移: (orginwidth*3 - containerWidth)/2/2 scale = 1 - Math.abs(slideProgress) / _scaleFactor; // 缩放比例阶梯: (clientWidth/orginWidth); 1 64 28 step = 36 zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); if (Math.abs(slideProgress) > 3) { slide.css('opacity', 0); } } }, onSetTransition: function (swiper, transition) { for (var i = 0; i < swiper.slides.length; i++) { var slide = swiper.slides.eq(i); slide.transition(transition); } } }); } var Fun = function () { var _winW = $(window).width(); var overscroll = window.innerWidth - document.body.clientWidth; $('.head-subnav,.p-head-bg').hide(); if (_winW + overscroll >= 1024) { // 重置 // $('nav').show(); $('.toggle-btn').removeClass('cur') $('nav,.public-subNav,.public-tab').show(); //导航滑动效果 $('.wrap-line').css({ 'left': $('nav li').eq($('nav .cur').index()).position().left, //.wrap-line 的定位等于第一个li的定位 'width': $('nav li').eq($('nav .cur').index()).find('h3').outerWidth() //.wrap-line 的宽度等于第一个li的宽度 }); // nav 移出事件 $('nav').on('mouseleave', function () { // $('.p-head-bg').stop(true, true).slideUp(300); $('.p-head-bg').stop(true, true).animate({ height: '0' }, 200); }); // 导航移入事件 $('nav li').off('mouseenter mouseleave').hover( function () { /*自定义动画*/ //鼠标移入触发的动画 $('.wrap-line').stop().animate({ left: $(this).position().left, //.wrap-line 的定位等于当前 li 的定位 width: $(this).find('h3').outerWidth() //.wrap-line 的宽度等于当前 li 的宽度 }); $(this).find('.head-subnav').stop(true, true).fadeIn(); $(this).siblings().find('.head-subnav').stop(true, true).hide(); if ($(this).find('.head-subnav a').length) { $('.p-head-bg').stop(true, true).slideDown(300); try { var _h = $(this).find('.head-subnav').outerHeight(); $('.p-head-bg').stop(true, true).animate({ height: _h }, 200); } catch (e) {} } else { $('.p-head-bg').stop(true, true).slideUp(300); } }, function () { //鼠标移开触发的动画 $('.wrap-line').stop().animate({ left: $('nav li').eq($('nav .cur').index()).position().left, //.wrap-line 的定位等于第一个 li 的定位 width: $('nav li').eq($('nav .cur').index()).find('h3').outerWidth() //.wrap-line 的宽度等于第一个 li 的宽度 }); $(this).find('.head-subnav').stop(true, true).hide(); } ) // 头部搜索框移入事件 $('.search-toggle-btn').off('mouseenter mouseleave').hover(function () { if ($(this).siblings('.search-box').is(':hidden')) { $(this).siblings('.search-box').stop(true, true).slideDown(300); } }, function () {}); $('.search').on('mouseleave', function () { console.log(123); $(this).find('.search-box').stop(true, true).slideUp(300); }); } else { // 重置 $('nav,.public-subNav,.foot-subnav').hide(); $('nav li,.foot-nav li').removeClass('active'); // 头部导航点击 $('.toggle-btn').off('click').on('click', function () { $('.search-box').hide(); if ($('nav').is(':hidden')) { $('nav').stop(true, true).slideDown(300); $(this).addClass('cur'); } else { $('nav').stop(true, true).slideUp(); $(this).removeClass('cur'); } }); // 头部搜索框点击 $('.search-toggle-btn').off('click').on('click', function () { $('nav').hide(); $('.toggle-btn').removeClass('cur'); if ($(this).siblings('.search-box').is(':hidden')) { $(this).siblings('.search-box').stop(true, true).slideDown(300); } else { $(this).siblings('.search-box').stop(true, true).slideUp(300); } }); //手机端底部导航显示/隐藏 toggleNav('.foot-nav', 'li i', '.foot-subnav', '.foot-nav li', '.foot-subnav a'); //手机端导航显示/隐藏 toggleNav('nav', 'li i', '.head-subnav', 'nav li', '.head-subnav a'); // 内页二级导航显示/隐藏 $('.public-nav-btn').off('click').on('click', function () { if ($(this).siblings('.public-subNav').is(':hidden')) { $(this).siblings('.public-subNav').stop(true, true).slideDown(300); } else { $(this).siblings('.public-subNav').stop(true, true).slideUp(); } }); // 判断内页是否有二级导航 if ($('.public-tab li').length > 1) { $('.public-tab').show(); } } }; Fun(); $(window).resize(function () { Fun(); if ($(window).width() >= 1024) { var _activeW = $('.team-content .swiper-slide-active').width() + 48 } else { var _activeW = $('.team-content .swiper-slide-active').width() + 20 } var _swiperBtnW = ($('.team-content').width() - _activeW) / 2 $('.team-prev,.team-next').css('width', _swiperBtnW); }); //数字滚动 function numscroll(e) { var i = e.parents("div").offset().top, t = e.attr("bolExec"); $(document).scrollTop() > i - 3 * $(window).height() / 4 && !t && (! function () { e.text(e.text().replace(".", "")); var i = 0, t = e.text() - 0, n = (t + "").length, s = setInterval(function () { i++; for (var o = parseInt(t / 100 * i), a = "", l = 0; l < n - (o + "").length; l++) a += 0; e.text(a + Number(o)); if (i >= 100) { e.text(e.attr("rel")); clearInterval(s) } }, 10); }(), e.attr("bolExec", !0)) } // 滚动到指定位置 function scrollToLocation() { if (!$('.public-tab-area').length) { return; } var mainContainer = $('.public-tab-area'), scrollToContainer = mainContainer.find('a.cur');//滚动到
中类名为son-panel的最后一个div处 //scrollToContainer = mainContainer.find('.son-panel:eq(5)');//滚动到
中类名为son-panel的第六个处 //非动画效果 // mainContainer.scrollLeft( // scrollToContainer.offset().left - mainContainer.offset().left + mainContainer.scrollLeft() // ); //动画效果 //0.5秒滑动到指定位置 mainContainer.animate({ scrollLeft: scrollToContainer.offset().left - mainContainer.offset().left + mainContainer.scrollLeft() }, 500); } scrollToLocation(); //页面滚动 function winScroll() { var t_top = $(window).scrollTop(); $(".num").each(function (i) { var wrapTop = $(this).offset().top; if (t_top > wrapTop - 800) { numscroll($(this)); } }); } winScroll(); }); (function ($) { $.uaMatch = function (ua) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; return { browser: match[1] || "", version: match[2] || "0" }; }; if (!$.browser) { matched = $.uaMatch(navigator.userAgent); browser = {}; if (matched.browser) { browser[matched.browser] = true; browser.version = matched.version; } // Chrome is Webkit, but Webkit is also Safari. if (browser.chrome) { browser.webkit = true; } else if (browser.webkit) { browser.safari = true; } $.browser = browser; } $(document).on('click', 'a#goon', function () { $("#ie-alert-overlay").hide(); $("#ie-alert-panel").hide(); }); function initialize($obj, support, title, text) { var panel = "" + title + "" + "

" + text + "

" + "
" + "
    " + "
  • " + "
  • " + "
  • " + "
  • " + "
  • " + "
      " + "
"; var overlay = $("
"); var iepanel = $("
" + panel + "
"); var docHeight = $(document).height(); overlay.css("height", docHeight + "px"); if (support === "ie9") { // ie9- if ($.browser.msie && parseInt($.browser.version, 10) < 10) { $obj.prepend(iepanel); $obj.prepend(overlay); } if ($.browser.msie && parseInt($.browser.version, 10) === 6) { $("#ie-alert-panel").css("background-position", "-626px -116px"); $obj.css("margin", "0"); } } else if (support === "ie8") { // ie8- if ($.browser.msie && parseInt($.browser.version, 10) < 9) { $obj.prepend(iepanel); $obj.prepend(overlay); } if ($.browser.msie && parseInt($.browser.version, 10) === 6) { $("#ie-alert-panel").css("background-position", "-626px -116px"); $obj.css("margin", "0"); } } else if (support === "ie7") { // ie7- if ($.browser.msie && parseInt($.browser.version, 10) < 8) { $obj.prepend(iepanel); $obj.prepend(overlay); } if ($.browser.msie && parseInt($.browser.version, 10) === 6) { $("#ie-alert-panel").css("background-position", "-626px -116px"); $obj.css("margin", "0"); } } else if (support === "ie6") { // ie6- if ($.browser.msie && parseInt($.browser.version, 10) < 7) { $obj.prepend(iepanel); $obj.prepend(overlay); $("#ie-alert-panel").css("background-position", "-626px -116px"); $obj.css("margin", "0"); } } }; $.fn.iealert = function (options) { var defaults = { support: "ie9", title: '\u6e29\u99a8\u63d0\u793a\uff1a\u60a8\u4f7f\u7528\u7684\u6d4f\u89c8\u5668\u7248\u672c\u8fc7\u4f4e\uff0c\u8bf7\u5347\u7ea7\u6d4f\u89c8\u5668\uff01', text: "\u4e3a\u4e86\u66f4\u597d\u7684\u7f51\u7ad9\u6d4f\u89c8\u4f53\u9a8c\u002c\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u60a8\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\u7684\u0049\u006e\u0074\u0065\u0072\u006e\u0065\u0074\u0020\u0045\u0078\u0070\u006c\u006f\u0072\u0065\u0072\u6216\u9009\u62e9\u5176\u4ed6\u4e3b\u6d41\u6d4f\u89c8\u5668\u3002\u63a8\u8350\u4f7f\u7528\u4e0b\u5217\u4e3b\u6d41\u6d4f\u89c8\u5668\uff1a

>>>\u7EE7\u7EED\u8BBF\u95EE" }; var option = $.extend(defaults, options); return this.each(function () { if ($.browser.msie) { var $this = $(this); initialize($this, option.support, option.title, option.text); } }); }; })(jQuery); $(document).ready(function () { $("body").iealert(); }); $(function () { }); //导航高亮 $(function(){ $(".nav-ul a").each(function() { if ($(this)[0].href == String(window.location)) { $(this).parents(".nav-ul>li").addClass("cur"); } }); }); /* $(window).resize(function(){ if($(window).width()> 1200){ } })*/ /* $(window).scroll(function () { var _headTop = $(window).scrollTop(); if (_headTop > 51) { $('.headerfixed').css("position","fixed"); $('.header-top ').hide(); } else { $('.headerfixed').css("position","relative"); $('.header-top ').show(); }; });*/