$(function(){ // $(window).resize(function () { // resize() // }); // function resize(){ // if ($(window).width() > 1024) { // if (window.navigator.userAgent.indexOf("MSIE")>=1 || !!window.ActiveXObject || "ActiveXObject" in window){ // $('.banner').innerHeight($(".content .theme").innerHeight()) // }else{ // $('.banner').height($(".content .theme").height()) // } // } // if ($(window).width() > 1440) { // if (window.navigator.userAgent.indexOf("MSIE")>=1 || !!window.ActiveXObject || "ActiveXObject" in window){ // $(".content .right").innerHeight($(".content .left").innerHeight()); // $(".content .list li").innerHeight(($(".content .right").innerHeight() - $(".content .title").innerHeight() - 80) / 9) // }else{ // $(".content .right").height($(".content .left").height()); // $(".content .list li").height(($(".content .left").height() - $(".content .title").height() - 80) / 9) // } // } // if ($(window).width() > 1280 && $(window).width() < 1440) { // $(".content .right").height($(".content .left").height()); // $(".content .list li").height(($(".content .left").height() - $(".content .title").height() - 80) / 8) // } // if($(window).width() <= 1280 && $(window).width() >=1024){ // if (window.navigator.userAgent.indexOf("MSIE")>=1 || !!window.ActiveXObject || "ActiveXObject" in window){ // $(".content .theme").innerHeight($('.banner').innerHeight()) // $(".banner").innerHeight($(".banner").innerWidth() / 2) // }else{ // $(".banner").height($(".banner").width() / 2) // $(".content .theme").height($('.banner').height()) // $(".content .theme ul li").height(($(".content .theme").height() - 50) / 6) // $(".content .theme ul li a span").css('line-height',$(".content .theme ul li").height()+'px') // var le = (parseInt($(".content .theme ul li a span:first-of-type").css('line-height')) - parseInt($(".content .theme ul li a span:first-of-type").css('height'))) / 2 // $(".content .theme ul li a span:first-of-type").css('margin-top',le) // } // } // if($(window).width() < 1024){ // $(".banner").height($(".banner").width() / 2) // } // } // resize(); function isIE(){ if (window.navigator.userAgent.indexOf("MSIE")>=1 || !!window.ActiveXObject || "ActiveXObject" in window){ setTimeout(function(){ var swiper = new Swiper('.swiper-container', { slidesPerView: 1, spaceBetween: 0, loop: true, pagination: { el: '.swiper-pagination', clickable: true, }, autoplay: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper, },200); }) resize(); $(".content .list li .notice,.content .news .con_left .con_body h3,.content .news .con_right .item p,.content .study .study_teacher ul li .con h4").css({height:"48px",overflow:"hidden"}) $(".content .news .con_left .con_body p").css({height:"84px",overflow:"hidden"}) $(".content .study .study_teacher ul li .con p").css({height:"78px",overflow:"hidden"}) if($(window).width() < 1152){ $(".content .study .study_teacher ul li .con h4").css({"height":"auto","max-height":"48px"}) $(".content .study .study_teacher ul li .con p").css({"height":"auto","max-height":"84px"}) } }else{ /*banner*/ setTimeout(function(){ var swiper = new Swiper('.swiper-container', { slidesPerView: 1, spaceBetween: 0, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper, watchOverflow: !0, loop: !0, speed: 500, autoplay:true, longSwipesRatio: .2, effect: "fade", fadeEffect: {crossFade: !0}, pagination: {el: ".swiper-pagination", type: "bullets", clickable: !0}, on: { init: function () { swiperAnimateCache(this), swiperAnimate(this) }, slideChangeTransitionEnd: function () { swiperAnimate(this), console.log(this.activeIndex); }, sliderMove: function () { this.touches.diff } } },200); }) } } isIE() });