$(function () { $(".tab-box .tab-a").each(function() { $(this).click(function() { if (!$(this).hasclass("off")) { $(this).addclass("on").siblings().removeclass("on"); var ii=$(this).index(); $(this).parents(".tab-box").find(".tab-b").eq(ii).show().siblings().hide(); } }); }) $(".tab-box").each(function (i) { $(this).find(".tab-a:eq(0)").click(); }); // var srcl="",simg=""; // $(".video_button").click(function(e){ // srcl=$(this).data("video"); // simg=$(this).data("img"); // $(".videolist_appbox").fadein(); // video(); // }) // $(".videolist_appbox .mask,.videolist_appbox .video_close").click(function(){ // $(".videolist_appbox").fadeout(); // $(".video_t").html("") // }) // function video(){ // $(".video_t").html("") // $(".video_t video").attr({width:$(".video_t").width(),height:$(".video_t").height()}) // } //end select(); team_list(); public_ajax(); }) function select(){ $(".select-box").each(function (i) { $(this).find("dt").click(function (e) { e.preventdefault(); e.stoppropagation(); var el = $(this).parent(".select-box"); if(el.hasclass('open')){ el.removeclass('open'); }else{ el.addclass('open'); el.parents("li").siblings("li").find(".select-box").removeclass('open'); } }) $(".select-box").eq(i).find("dd a").each(function (x) { $(this).click(function () { var inde = $(this).index(); $(this).addclass("on").siblings().removeclass("on"); var el = $(".select-box.open"); el.next(".select-hidden").val($(this).attr("data-val")) el.find("dt a").html($(this).html()); el.find("dd a").eq(inde).addclass("on").siblings().removeclass("on"); settimeout(function () { el.removeclass("open"); },1) }) }) }) $(document).click(function () { $(".select-box.open").removeclass("open"); }) } function cul_list(){ var culswiper = new swiper('.culture-part05 .swiper-container',{ slidesperview : 3, slidespergroup : 1, spacebetween : 40, prevbutton:'.culture-part05 .swiper-button-prev', nextbutton:'.culture-part05 .swiper-button-next', breakpoints: { //当宽度小于等于320 767: { slidesperview: 1, spacebetween: 10 } } }) if($(".culture-part05 li").size()<=3){ $(".culture-part05 .swiper-button-prev,.culture-part05 .swiper-button-next").hide(); } } function team_list(){ $(".team-part ul li").click(function(){ $(".team_tc").html($(this).find('.profile').html()); // $(".team_tc .team-bot .inner").mcustomscrollbar(); $(".team_photos").show(); $(".team_tc_bg").show(); }) $(".team_close").click(function(){ $(".team_photos").hide(); $(".team_tc_bg").hide(); $(".team_tc").html(""); }) $(".team_tc_bg").click(function(){ $(".team_photos").hide(); $(".team_tc_bg").hide(); $(".team_tc").html(""); }) } //public_ajax function public_ajax() { if($(".ajload").length>0){ var $resourcetypelist = $('.ajload ul'); $resourcetypelist.infinitescroll({ navselector: "#public_more", nextselector: "#public_more a", itemselector: ".public_li", clickb: true, clickobj: ".public_load-more-link", loading: { img: "/static/images/loading.gif", msgtext: ' ', finishedmsg: '', finished: function() { $("#infscr-loading").remove(); imgratio(); } }, errorcallback: function() { $(".public_load-more-link").after("
没有了
"); $(".public_load-more-link").hide(); settimeout(function () { $(".finmessage").fadeout(); }, 500) } }, function(newelements) { var $newelems = $(newelements); $newelems.fadein(); return; }); } } $(function(){ settimeout(function () { $(".sel-box dd a").eq(0).click(); }, 200); $(".sel-box dd a").click(function(){ var url = $(this).data("src"); if(url == ""){ return false; }else{ investajax(".pub_append",url) } }) }) function investajax(str,url){ if (url.indexof('?') == -1) { url += '?tm=' + math.random(); } else { url += '&tm=' + math.random(); } $.ajax({ url:url, success:function(msg){ $(str).html(""); $(str).append(msg) } }); } $(function () { $(".case_show_s li").eq(0).addclass("on"); glimpse_swi() for (var i = 0; i < $('.record_ul li').size(); i++) { new wormdigitalscroll({ el: $('.record_ul li').eq(i).find('em').get(0), time: 5000 }) } if ($(".slider_txt").length > 0) { $(".slider_txt").mcustomscrollbar({ mousewheelpixels:500, autodraggerlength:false }); } //========= $(".calendar_ul li").click(function () { var index=$(this).index() $(this).addclass("on").siblings().removeclass("on") $(".calendar_swi").eq(index).addclass("on").siblings().removeclass("on") }) var calendarswi = [] for (var i = 0; i < $('.calendar_swi').length; i++) { calendarswi[i] = new swiper( $('.calendar_swi') .eq(i) .find('.swiper-container') .get(0), { pagination: $('.calendar_swi') .eq(i) .find('.swiper-pagination') .get(0), // paginationclickable: true, slidesperview: 5, spacebetween: 0, nextbutton: $('.calendar_swi') .eq(i) .find('.swiper-button-next') .get(0), prevbutton: $('.calendar_swi') .eq(i) .find('.swiper-button-prev') .get(0), paginationclickable: true, breakpoints: { 1200: { slidesperview: 4, spacebetween: 0 }, 1024: { slidesperview: 3, spacebetween: 0 }, 767: { slidesperview: 1, spacebetween: 0 } } } ) } }) function glimpse_swi() { var _ind=0; var _len = $(".case_show_s .swiper-slide").length; if(window.screen.width >= 768){ var my_swiper = new swiper('.case_show_b .swiper-container',{ slidesperview: 1,//设置slider容器能够同时显示的slides数量(carousel模式) spacebetween: 10, // effect:'fade', loop:true, noswiping : true, prevbutton:'.case_show_b .swiper-button-prev', nextbutton:'.case_show_b .swiper-button-next', observer:true, observeparents:true, oninit: function(swiper){ // console.log(_ind) // swiper.slideto(_ind,1000) }, breakpoints:{ 767: { spacebetween:0, // noswiping : false, }, } }) } var case_swiper = new swiper('.case_show_s .swiper-container',{ slidesperview: 5,//设置slider容器能够同时显示的slides数量(carousel模式) spacebetween: 20,//slide之间的距离(单位px)。 prevbutton:'.case_show_s .swiper-button-prev', nextbutton:'.case_show_s .swiper-button-next', noswiping : true, observer:true, observeparents:true, breakpoints:{ 1024: { slidesperview: 3, spacebetween:10 }, 767: { slidesperview: 2, spacebetween:10 }, } }) $(".case_show_s .swiper-button-prev").addclass("disabled"); $(".case_show_s .swiper-button-prev").click(function(){ _ind--; btnjudge(); $(".case_show_s .swiper-slide").eq(_ind).addclass("on").siblings().removeclass("on"); // my_swiper.slideto(_ind, 1000, false); }) $(".case_show_s .swiper-button-next").click(function(){ _ind++; btnjudge(); $(".case_show_s .swiper-slide").eq(_ind).addclass("on").siblings().removeclass("on"); // my_swiper.slideto(_ind, 1000, false); }) $(".case_show_s .swiper-slide").click(function(){ $(this).addclass("on").siblings().removeclass("on"); _ind = $(this).index(); btnjudge(); // my_swiper.slideto(_ind, 1000, false); }) // $(".case_show_s .swiper-slide:eq(1)").click(); function btnjudge() { if(_ind >= _len - 1) { $('.case_show_s .swiper-button-next').addclass("disabled") _ind = _len - 1; } else { $('.case_show_s .swiper-button-next').removeclass("disabled") } if(_ind <= 0) { $(".case_show_s .swiper-button-prev").addclass("disabled") _ind = 0; } else { $(".case_show_s .swiper-button-prev").removeclass("disabled") } } if($(".case_show_s li").length>5){ $(".case_show_s .but").show(); } } // javascript document $(function(){ var paginations =array.prototype.map.call($('.timeline .swiper-pagination span'), function(n){ return [n.innerhtml, n.classname]; }); var activityswiper = new swiper('.timeline .swiper-container', { autoheight:false, slidesperview: 1, spacebetween: 0, prevbutton: '.timeline .swiper-button-prev', nextbutton: '.timeline .swiper-button-next', observer: true, observeparents: true, pagination : '.timeline .swiper-pagination', paginationclickable:true, paginationbulletrender:function(swiper, index, classname){ classname += ' '+paginations[index][1]; return '' + paginations[index][0] + ''; } }) $(document).on("click",".vide0_close",function(){ $("body").removeclass("lightbox-noscrol"); $(this).parents(".video_appbox").removeclass("show") $(".video_t").html("") }); var srcl="",simg=''; //高度计算 $(document).on("click",".video_button",function(e){ $("body").addclass("lightbox-noscrol"); srcl=$(this).data("video"); simg=$(this).data("img"); $(".video_appbox").addclass("show") video(); }) $(document).on("click",".video_appbox .mask",function(){ $("body").removeclass("lightbox-noscrol"); $(".video_appbox").removeclass("show") $(".video_t").html("") }) function video(){ $(".video_t").html(``); $(".video_t iframe").attr({width:$(".video_t").width(),height:$(".video_t").height()}); } }) $(function () { if($(window).width()<767){ } else{ $(".video-box").addclass('pause'); $(".video-box").find("video").trigger("pause"); $(document).on("click", ".video-box", function (){ var this_v = $(this).find("video"); if ($(this).hasclass('pause')) { this_v.trigger("play"); $(this).removeclass('pause'); $(this).addclass('play'); $(this).find('em').hide(); } else { this_v.trigger("pause"); $(this).removeclass('play'); $(this).addclass('pause'); $(this).find('em').show(); } }) } }) $(function () { itemtop(); }) function itemtop() { var _ind = 0; var _len = $(".item-top .swiper-stages .swiper-slide").length; var itemtop_swiper = new swiper('.item-top .swiper-container.swiper-stages', { nextbutton: '.item-top .swiper-button-next', prevbutton: '.item-top .swiper-button-prev', slidesperview:4, // spacebetween: 40, breakpoints: { 1279: { spacebetween : 20, }, 1023: { slidesperview: 3, // spacebetween : 10, }, 767: { slidesperview: 1, // spacebetween : 5, } } }); var list_swiper = new swiper('.item-m .swiper-container.swiper-stages-t', { nextbutton: '.item-m .swiper-button-next', prevbutton: '.item-m .swiper-button-prev', slidesperview:4, spacebetween: 0, breakpoints: { 1279: { spacebetween : 0, }, 1023: { slidesperview: 3, spacebetween : 0, }, 767: { slidesperview: 1, spacebetween : 0, } } }); if($(window).width()>1023){ if(_len<=4){ $(".item-top .swiper-button-prev").hide(); $(".item-top .swiper-button-next").hide(); } } btnjudge(); $(".item-top .swiper-button-prev").click(function() { _ind--; btnjudge() $(".item-top .swiper-slide").eq(_ind).addclass("on").siblings().removeclass("on"); $(".item-top .swiper-slide.on").click(); }) $('.item-top .swiper-button-next').click(function() { _ind++; btnjudge() $(".item-top .swiper-slide").eq(_ind).addclass("on").siblings().removeclass("on"); $(".item-top .swiper-slide.on").click(); }) $(".item-top .swiper-slide").click(function(){ _ind = $(this).index(); $(this).addclass("on").siblings().removeclass("on"); btnjudge(); $(this).parents(".item-top").parent().find(".his-years").eq(_ind).show().siblings().hide(); $(this).parents(".item-top").parent().find(".his-events").eq(_ind).show().siblings().hide(); itembot(_ind); }) $(".item-top .swiper-slide").eq(0).click(); function btnjudge() { //console.log(_ind,_len) if(_ind >= _len - 1) { $('.swiper-button-next').addclass("disabled") _ind = _len - 1; } else { $('.swiper-button-next').removeclass("disabled") } if(_ind <= 0) { $(".swiper-button-prev").addclass("disabled") _ind = 0; } else { $(".swiper-button-prev").removeclass("disabled") } } } function itembot(stage) { var _ind_b = 0; var _len_b = $(".his-ll .swiper-slide").length; if($('.his-ll .swiper-container.swiper-stage:eq('+stage+') ul li').length > 5){ $('.his-ll .swiper-container.swiper-stage:eq('+stage+') .swiper-btn').show(); } var itembot_swiper = new swiper('.his-ll .swiper-container.swiper-stage:eq('+stage+')', { nextbutton: '.his-ll .swiper-button-next', prevbutton: '.his-ll .swiper-button-prev', slidesperview:5, slidespergroup:5, spacebetween : 60, prevbutton:'.swiper-button-prev', nextbutton:'.swiper-button-next', onslidechangeend: function(swiper){ $(".his-ll .his-years:eq("+stage+") .swiper-slide:eq("+ swiper.activeindex +")").click(); }, direction :'vertical', breakpoints: { 1023: { spacebetween : 40, }, 767: { spacebetween : 20, } } }); btnjudge_b(); $(".his-ll .his-years:eq("+stage+") .swiper-slide").click(function(){ _ind_b = $(this).index(); $(this).addclass("on").siblings().removeclass("on"); btnjudge_b(); /* 1. 图片和文字居中对齐 2. 第一个年份对齐第一行文字 3. 其他年份,如果单行对齐第一行文字,如果多行对齐第一行的下划线。 */ var $rightcontent = $(this).parents('.his-wrap').find(".his-events").eq(stage).find('.his-event').eq(_ind_b); var offset = _ind_b % 5 * $(this).outerheight(true); $rightcontent.css('display','flex').siblings().hide(); // 计算第一行的相对偏移量 var top = $rightcontent.find('li')[0].offsettop; offset = offset === 0 ? -top : (offset-top); // 如果超过一行再计算第一行下划线的偏移量 offset = offset > 0 && $rightcontent.find('li').length > 1 ? offset - 32 : offset; offset+=40; // 小屏处理 if($(window).width()<767){ offset = 0; } $rightcontent.css('margin-top',offset +'px'); }) settimeout(()=> $(".his-ll .his-years:eq("+stage+") .swiper-slide").first().click(),0) function btnjudge_b() { if(_ind_b >= _len_b - 1) { $('.his-ll .swiper-button-next').addclass("disabled") _ind_b = _len_b - 1; } else { $('.his-ll .swiper-button-next').removeclass("disabled") } if(_ind_b <= 0) { $(".his-ll .swiper-button-prev").addclass("disabled") _ind_b = 0; } else { $(".his-ll .swiper-button-prev").removeclass("disabled") } } } // index page $(function(){ $('.index_bottom .swiper-container').each(function(index, item){ //$(item).attr('id', 'settime' + index); $(item).addclass('swiper' + index); $(item).find(".swiper-button-prev").addclass('swiper-button-prev' + index); $(item).find(".swiper-button-next").addclass('swiper-button-next' + index); $(item).find(".swiper-pagination").addclass('swiper-pagination' + index); var slide01 = new swiper('.swiper'+ index, { autoplay: 3000, speed:1000, loop: true, prevbutton:'.index_bottom .swiper-button-prev'+ index, nextbutton:'.index_bottom .swiper-button-next'+ index, autoplaydisableoninteraction : false, pagination: '.index_bottom .swiper-pagination'+ index, paginationclickable :true, }) }) }) $(document).ready(function() { var swiperflag = false; var myswiper; $(".banner li").eq(0).addclass("ani-slide"); if($(".banner li").length>1){ myswiper = new swiper('.banner .swiper-container', { autoplay: 5000, speed:1000, autoheight: true, loop: true, prevbutton:'.banner .swiper-button-prev', nextbutton:'.banner .swiper-button-next', autoplaydisableoninteraction : false, pagination: '.banner .swiper-pagination', paginationclickable :true, oninit: function(swiper){ slide=swiper.slides.eq(0); slide.addclass('ani-slide'); },ontransitionstart: function(swiper){ for(i=0;i { swiper.updateautoheight(); }, 500); } }) } if ($(window).width()>767) { if($(".banner li").length>1){ videoselect($('.banner .swiper-slide.swiper-slide-active')); }else{ videoselect02($('.banner .swiper-slide.swiper-slide-active')); } }else{ } function videoselect(_this) { var flag = true; var cc = _this.hasclass('ban_video'); if(cc) { myswiper.stopautoplay(); var videos = ''; _this.append(videos); var aaa = setinterval(function() { if(!isnan($(".vv").get(0).duration) && flag) { clearinterval(aaa); flag = false; settimeout(function() { _this.find('video').css("display", "block"); }, 500) } }, 10); _this.find('video').bind('ended', function() { myswiper.slidenext(); myswiper.startautoplay(); }); } else { $('.vv').remove(); } } function videoselect02(_this) { var flag = true; var cc = _this.hasclass('ban_video'); if(cc) { myswiper.stopautoplay(); var videos = ''; _this.append(videos); var aaa = setinterval(function() { if(!isnan($(".vv").get(0).duration) && flag) { clearinterval(aaa); flag = false; settimeout(function() { _this.find('video').css("display", "block"); }, 500) } }, 10); _this.find('video').bind('ended', function() { myswiper.slidenext(); myswiper.startautoplay(); }); } else { $('.vv').remove(); } } if($(".banner li").length>1){ $(".banner .but").show(); }else{ $(".banner .but").hide(); } }) $(function(){ if($('.sd .swiper-container').length){ var certifyswiper = new swiper('.sd .swiper-container', { watchslidesprogress: true, slidesperview: 'auto', centeredslides: true, loop: true, loopedslides: 4, autoplay: false, slidetoclickedslide:true, nextbutton: '.swiper-button-next', prevbutton: '.swiper-button-prev', onprogress: function (swiper, progress) { 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 * 260 + 'px'; scale = 1 - math.abs(slideprogress) / 5; 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); } } }) } }) $(function(){ $('body').append('
'); var $gotop = $('#gotop-btn'); $gotop.on('click',function(){ $("html,body").animate({ scrolltop: "0" }); }); $(window).on('scroll',function(){ if (document.body.scrolltop > 600 || document.documentelement.scrolltop > 600) { $gotop.show(); } else { $gotop.hide(); } }) }) /************************** added 0520 **************************** */ jquery(function($){ function switchtabs($titles, $pannels){ $titles.on('click',function(){ const index = $(this).index(); $(this).addclass('on'); $(this).siblings().removeclass('on'); $pannels.eq(index).show(); $pannels.not(`:eq(${index})`).hide(); return false; }); } const $titles = $('.tabs-title li'); const $pannels = $('.tabs-content li'); switchtabs($titles, $pannels); });