$(function () { judescreen(); $(window).resize(function () { judescreen(); }); function judescreen() { if ($(window).width() >= 1024) { //1024 $('.nav li').off('mouseenter mouseleave').hover(function () { $('.language-wrap').hide(); $(this).find('.sub-nav').stop(true, true).slideDown(300); var num = $(this).index(); $('.inpage-header').addClass('blackbg'); }, function () { $('.sub-nav').hide(); $('.inpage-header').removeClass('blackbg'); }); //搜索页 $('.search-btn').off("mouseenter mouseleave").hover(function () { $(".m-search-box").stop(true, true).slideUp(); $(this).find(".m-search-box").stop(true, true).slideDown(300); }, function () { $(this).find(".m-search-box").hide(); }); //搜索页 $('.search-box').off("mouseenter mouseleave").hover(function () { $(".m-search-box").stop(true, true).slideUp(); $(this).find(".m-search-box").stop(true, true).slideDown(300); }, function () { $(this).find(".m-search-box").hide(); }); // $(".language-box").off("mouseenter mouseleave").hover(function () { // $(this).find(".language-list").stop(true, true).slideDown(300); // }, function () { // $(".language-list").stop(true, true).slideUp(300); // }); } else { $('.nav li,.weixin').off('mouseenter mouseleave'); $(".footersub-nav").hide(); $(".footer-nav li.li1 h4").off("click").on("click", function () { if ($(this).next().is(":hidden")) { $(".footersub-nav").slideUp(300); $(".footer-nav li.li1 h4").removeClass("cur"); $(this).addClass("cur"); $(this).next().slideDown(300); } else { $(this).removeClass("cur"); $(this).next().slideUp(300); } }); //搜索 $(".search-icon").off("click").on("click", function () { if ($(".m-search-box").is(":hidden")) { $(".m-search-box").slideDown(300); } else { $(".m-search-box").slideUp(300); } }); } } //移动端展开下拉 $(".mobnav-btn").off("click").on("click", function () { if ($(".nav").is(":hidden")) { $(this).addClass("g_close"); $(".nav").slideDown(300); $('#side-form-button,#back-to-top').hide(); } else { $(".nav").slideUp(); $(this).removeClass("g_close"); $('#side-form-button,#back-to-top').css('display', 'flex'); } }); $('nav ul li h3').on('click', function () { if ($(this).next('.sub-nav').is(':hidden')) { $('.sub-nav').slideUp(300); $('nav ul li').removeClass('active'); $(this).parents('li').addClass('active'); $(this).next('.sub-nav').stop(true, true).slideDown(300); } else { $('nav ul li').removeClass('active'); $('.sub-nav').slideUp(300); } }); //判断是否有二级 $('.header-nav ul li').each(function () { if (!$(this).find('.sub-nav a').length) { $(this).find('.arrorright-btn').remove(); } }) if (typeof Swiper != 'undefined') { var indexSwiper = new Swiper('.banner', { paginationClickable: true, loop: true, speed: 1200, autoplay: 5000, pagination: '.banner .m-dot', prevButton: '.banner .banner-left', nextButton: '.banner .banner-right', autoplayDisableOnInteraction: false }); var newsSwiper = new Swiper('.news-slider', { paginationClickable: true, loop: true, speed: 1200, autoplay: 5000, pagination: '.news-slider .m-dot', autoplayDisableOnInteraction: false }); var markSwiper = new Swiper('.markets-slider', { paginationClickable: true, loop: true, speed: 1200, autoplay: 5000, pagination: '.markets-slider .repro-dot', autoplayDisableOnInteraction: false, simulateTouch: false, }); var $productAbtns = $('.case-wrapper li'); var caclickIndex = 0; var caclickLen = $productAbtns.length; var caseSw = new Swiper('.case-wrapper', { //loop: true, slidesPerView: 1, observer: true, observeParents: true, //prevButton: '.incase-control .incase-left', //nextButton: '.incase-control .incase-right', paginationClickable: true, effect: 'fade', breakpoints: { 1024: { effect: 'slide', }, }, onSlideChangeEnd: function (swiper) { caclickIndex = swiper.activeIndex; incaseSwiper.slideTo(caclickIndex); } }) var incaseSwiper = new Swiper('.incase-slider', { //loop: true, speed: 1200, autoplay: false, slidesPerView: 1.34, spaceBetween: 50, pagination: '.incase-pagination', // prevButton: '.incase-control .incase-left', //nextButton: '.incase-control .incase-right', roundLengths: true, paginationType: 'custom', autoplayDisableOnInteraction: false, breakpoints: { 768: { spaceBetween: 20 }, }, onSlideChangeEnd: function (swiper) { caclickIndex = swiper.activeIndex; caseSw.slideTo(caclickIndex); }, paginationCustomRender: function (swiper, current, total) { return '' + current + '' + total + ''; } }); $('.incase-control .incase-left,.incase-control .incase-right').on('click', function () { if ($(this).hasClass('incase-left')) { caclickIndex = caclickIndex <= 0 ? 0 : caclickIndex - 1; } else { caclickIndex = caclickIndex >= caclickLen ? caclickLen : caclickIndex + 1; } incaseSwiper.slideTo(caclickIndex); caseSw.slideTo(caclickIndex); }); //产品轮播 var proSwiper = new Swiper('.newspro-swiper', { paginationClickable: true, loop: true, speed: 1200, autoplay:6000, pagination: '.newspro-banner .newspro-dot', autoplayDisableOnInteraction: false, simulateTouch: false, }); var listTab = new Swiper('.list-pronav .swiper-container', { slidesPerView:5, prevButton:".list-pronav .prev", nextButton:".list-pronav .next", breakpoints: { 1024: { slidesPerView:'auto', } } }); if($('.list-pronav').length){ listTab.slideTo($('.list-pronav li.cur').index(), 800, false); //切换slide } // }); // var artSwiper = new Swiper('.pro-artslider', { // paginationClickable: true, // loop: true, // speed: 1200, // autoplay: false, // autoplayDisableOnInteraction: false, // simulateTouch: false, // effect: 'fade', // fade: { // crossFade: false, // } // }); // proSwiper.params.control = artSwiper;//需要在Swiper2初始化后,Swiper1控Swiper2 var caseSwiper = new Swiper('.casedeatils-slider', { paginationClickable: true, // loop: true, speed: 1200, autoplay: 5000, pagination: '.casedeatils-slider .case-dot', prevButton: '.case-prev', nextButton: '.case-next', autoplayDisableOnInteraction: false, simulateTouch: false, }); //推荐 var rdSwiper = new Swiper('.recommend-bigslide', { paginationClickable: true, // loop: true, speed: 1200, autoplay: 6000, pagination: '.recommend-bigslide .repro-dot', autoplayDisableOnInteraction: false, //simulateTouch: false, }); var rdliSwiper = new Swiper('.recommend-smallslide', { paginationClickable: true, // loop: true, speed: 1200, autoplay: 6000, slidesPerView: 3, pagination: '.recommend-smallslide .repro-dot', autoplayDisableOnInteraction: false, //simulateTouch: false, breakpoints: { 767: { slidesPerView: 2, }, 640: { slidesPerView: 1, } }, }); var sCSwiper = new Swiper('.showcase-slide', { paginationClickable: true, // loop: true, speed: 1200, autoplay: 6000, slidesPerView: 3, spaceBetween: 25, prevButton: '.showcase-swrap .m-left', nextButton: '.showcase-swrap .m-right', pagination: '.showcase-swrap .inner-dot', autoplayDisableOnInteraction: false, simulateTouch: false, breakpoints: { 767: { slidesPerView: 2, }, 640: { slidesPerView: 1, } }, }); if ($('.showcase-swrap').length) { if (sCSwiper.slides.length < 4) { $('.showcase-swrap .m-btn').hide(); } } //about history var yearTab = new Swiper('.year-tab', { slidesPerView: 'auto', }); var hlSwiper = new Swiper('.hstory-list', { paginationClickable: true, // loop: true, speed: 1200, autoplay: false, autoplayDisableOnInteraction: false, simulateTouch: false, effect: 'fade', fade: { crossFade: false, } }); var himgSwiper = new Swiper('.history-imgslider', { paginationClickable: true, // loop: true, speed: 1200, autoplay: false, autoplayDisableOnInteraction: false, simulateTouch: false, }); $('.year-tab li').on('click', function (index) { hlSwiper.slideTo($(this).index(), 800, false); //切换slide himgSwiper.slideTo($(this).index(), 800, false); //切换slide $(this).addClass("cur").siblings().removeClass("cur"); }); if ($('.year-tab').length) { if ($('.year-tab li').hasClass('cur')) { yearTab.slideTo($(this).index(), 800, false); } } //contact var rdSwiper = new Swiper('.contact-banner', { paginationClickable: true, loop: true, speed: 1200, autoplay: 6000, prevButton: '.contact-prev', nextButton: '.contact-next', autoplayDisableOnInteraction: false, simulateTouch: false, }); } //返回 var backtop = $(".back-up"); var wint = $(window).scrollTop(); $(window).on('scroll', function () { wint = $(window).scrollTop(); if (wint <= 400) { backtop.fadeOut(300); }; if (wint > 400) { backtop.fadeIn(300); }; }); backtop.on('click', function () { $("html,body").stop(false, true).animate({ "scrollTop": 0 }, 500); return false; }); if (typeof WOW != 'undefined') { var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); wow.init(); } //判断是否显示 var videoRel = $('.product-video').attr('rel'); if (videoRel == '') { $('.product-video').remove(); } //视频播放 var host = location.protocol + '//' + location.host; var videoObject = { container: '#videobox1', //容器的ID或className variable: 'player', //播放函数名称 autoplay: true, //是否自动播放 debug: true, //是否开启调试模式 drag: 'start', //拖动的属性 seek: 0, //默认跳转的时间 playbackrate: -1, flashplayer: false,//如果强制使用flashplayer则设置成true mobileCkControls: false }; // palybtn function ckplayerX($showbtn, $hidebtn) { var player; $(document).on('click', $showbtn, function () { _videofile = $(this).attr('rel'); if (!_videofile == '') { $(".recruitmentfloat").fadeIn(300); videoObject.video = _videofile; player = new ckplayer(videoObject); } else { } }) $(document).on('click', $hidebtn, function () { player.videoPause(); $('.recruitmentfloat').fadeOut(300); $(".recruitmentfloat .videobox").html(""); }); } ckplayerX('.product-video,.video-list li,.Recommend-video,.index_cases_swiper .swiper-slide', '.recclosebtn'); //表单 $('.contact-link,.service-form').on('click', function () { $('.productbg,.product-form').fadeIn(); }); $('.productbg,.porcolose-btn').on('click', function () { $('.productbg,.product-form').fadeOut(); }); //筛选 $(document).on('click', '.filter-wrap ul li .cur-option', function (e) { e.stopPropagation(); $('.filter-wrap ul li').removeClass('active'); $(this).parents('li').addClass('active'); $('.filter-option').stop(true, true).slideUp(); $(this).parents('li').find('.filter-option').stop(true, true).slideDown(300); }); $('.filter-option a').on('click', function (e) { e.stopPropagation(); var curText = $(this).text(); $(this).parents('li').find('.cur-option').text(curText); $(this).parents('.filter-option').stop(true, true).slideUp(); $('.filter-wrap ul li').removeClass('active'); }); //点击空白关闭 $(document).on('click', function (e) { if (!$(e.target).closest('.filter-option').length) { $('.filter-option').stop().slideUp(); $('.filter-wrap ul li').removeClass('active'); } }); $('.caseshare-box').off("mouseenter mouseleave").hover(function () { $(this).find('.video-bdshare').addClass('active'); }, function () { $('.video-bdshare').removeClass('active'); }); //常见 问题 $(".faq-list ul li").eq(0).addClass("cur"); $(".faq-list ul li").eq(0).find('.faq-content').show(); $(document).on("click", ".faq-list .faq-title", function () { if ($(this).next().is(":hidden")) { $(this).parents('li').addClass("cur").siblings().removeClass("cur"); $('.faq-content').stop().slideUp(); $(this).next().slideDown(300); } else { $(this).parents('li').removeClass("cur"); $('.faq-content').stop().slideUp(); }; }); /*20191014 */ $('.sub-nav-tab a').hover(function () { //alert('13'); var index = $(this).index(); $(this).parents('li').find('.nav-item').eq(index).show().siblings().hide(); }); $(".lang-icon").on("click", function () { $(".m-search-box").hide(); if ($(".language-wrap").is(":hidden")) { $(".language-wrap").slideDown(300); $('.inpage-header').addClass('blackbg'); } else { $(".language-wrap").slideUp(); $('.inpage-header').removeClass('blackbg'); } }); $('.nav-img a:eq(0)').show(); $('.three-type a').hover(function () { var index = $(this).index(); $(this).parents('.nav-item').find('.nav-img a').eq(index).show().siblings().hide(); }) //荣誉资质 if (typeof Swiper != 'undefined') { var $honorAbtns = $('.small-honor li'); var clickIndex = 0; var clickLen = $honorAbtns.length; var honorAalbumSw = new Swiper('.big-honor', { slidesPerView: 1, observer: true, observeParents: true, pagination: '.big-honor .honor-dot', paginationClickable: true, effect: 'fade', fade: { crossFade: false, }, breakpoints: { 1024: { effect: 'slide', } }, onSlideChangeEnd: function (swiper) { clickIndex = swiper.activeIndex; $honorAbtns.eq(clickIndex).addClass('cur').siblings().removeClass('cur'); honorAbtnsSw.slideTo(clickIndex); } }); var honorAbtnsSw = new Swiper('.small-honor', { slidesPerView: 3, spaceBetween: 9, observer: true, observeParents: true, onInit: function (swiper) { $honorAbtns.eq(swiper.activeIndex).addClass('cur'); }, onClick: function (swiper) { clickIndex = swiper.clickedIndex; swiper.slideTo(clickIndex); $honorAbtns.eq(clickIndex).addClass('cur').siblings().removeClass('cur'); honorAalbumSw.slideTo(clickIndex); } }); $('.honor-left,.honor-right').on('click', function () { if ($(this).hasClass('honor-left')) { clickIndex = clickIndex <= 0 ? 0 : clickIndex - 1; } else { clickIndex = clickIndex >= clickLen ? clickLen : clickIndex + 1; } $honorAbtns.eq(clickIndex).addClass('cur').siblings().removeClass('cur'); honorAalbumSw.slideTo(clickIndex); }); }; $(document).on('click', '.insrecruit-list li .rectue-top', function () { var _this = $(this); if (_this.next().is(':hidden')) { _this.parents('li').addClass('cur').siblings().removeClass("cur"); _this.next().stop().slideDown(); _this.parents('li').siblings().find('.rectue-min').stop().slideUp(300); } else { _this.parents('li').removeClass("cur"); _this.next().slideUp(); } }); }); (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 getFixeaderH($header) { var $pageHeader = $header || $('header ,.header'); return $pageHeader.css('position') === 'fixed' ? $pageHeader.outerHeight() : 0; }; function setdetailBShareFixed() { var $article = $('.newsdetailB-article'); $share = $('.newsdetailB-bdshare'); var _shareCssTop = getFixeaderH() + 76; var _shareCssBot = 55; var _shareTop = $article.length ? $article.offset().top - getFixeaderH() : 0; var _shareEnd = _shareTop + $article.outerHeight() - ($share.outerHeight() + _shareCssTop + _shareCssBot); var _scrTop = 0; $(window).resize(function () { _shareTop = $article.length ? $article.offset() - getFixeaderH().top : 0; _shareEnd = _shareTop + $article.outerHeight() - ($share.outerHeight() + _shareCssTop + _shareCssBot); }); $(window).scroll(function () { if ($article.length && $(window).width() >= 1024) { _scrTop = $(window).scrollTop(); if (_scrTop > _shareTop) { $share.addClass('js-fixed-top').css({ 'top': _shareCssTop, 'bottom': 'auto' }); if (_scrTop >= _shareEnd) { $share.addClass('js-absolute-bottom').css({ 'top': 'auto', 'bottom': _shareCssBot }).removeClass('js-fixed-top'); } else { $share.removeClass('js-absolute-bottom'); } } else { $share.removeClass('js-fixed-top'); }; } }); }; $(window).on('load', function () { setdetailBShareFixed(); }); }); (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 getFixeaderH($header) { var $pageHeader = $header || $('header ,.header'); return $pageHeader.css('position') === 'fixed' ? $pageHeader.outerHeight() : 0; }; function setdetailBShareFixed() { var $article = $('.newsdetailB-article'); $share = $('.newsdetailB-bdshare'); var _shareCssTop = getFixeaderH() + 76; var _shareCssBot = 55; var _shareTop = $article.length ? $article.offset().top - getFixeaderH() : 0; var _shareEnd = _shareTop + $article.outerHeight() - ($share.outerHeight() + _shareCssTop + _shareCssBot); var _scrTop = 0; $(window).resize(function () { _shareTop = $article.length ? $article.offset()- getFixeaderH().top : 0; _shareEnd = _shareTop + $article.outerHeight() - ($share.outerHeight() + _shareCssTop + _shareCssBot); }); $(window).scroll(function () { if ($article.length && $(window).width() >= 1024) { _scrTop = $(window).scrollTop(); if (_scrTop > _shareTop) { $share.addClass('js-fixed-top').css({ 'top': _shareCssTop, 'bottom': 'auto' }); if (_scrTop >= _shareEnd) { $share.addClass('js-absolute-bottom').css({ 'top': 'auto', 'bottom': _shareCssBot }).removeClass('js-fixed-top'); } else { $share.removeClass('js-absolute-bottom'); } } else { $share.removeClass('js-fixed-top'); }; } }); }; $(window).on('load', function () { setdetailBShareFixed(); }); });