$(function(){ var winH=$(window).height(); var winW=$(window).width(); //首页banner 轮播 var mySwiper = new Swiper('.swiper-container1',{ pagination: '.pagination', autoplay : 9000,//可选选项,自动滑动 loop : true,//可选选项,开启循环 paginationClickable: true, autoplayDisableOnInteraction:false, speed:500 }) if(winW>767){ }else{ $(document).on('click','.map-con .list-tab1 ul li',function(){ var index = $(this).index(); $(this).addClass("on").siblings().removeClass("on"); $(".map-con .list-tab2 ul li").eq(index).addClass("on").fadeIn().siblings().removeClass("on"); }); } if(winW>767){ $(".in-banner .swiper-slide a").css({'height':winH+'px'}); $(".in-banner .swiper-slide .pic2").css({'height':winH+'px'}); }else{ $(".in-banner .swiper-slide .pic").css({'height':winW*0.5625+'px'}); } // 苹果手机自动播放视频 document.addEventListener("WeixinJSBridgeReady",function() { document.getElementById('ios_video1').play(); document.getElementById('ios_video2').play(); }, false); // 安卓手机不显示视频 $(function () { var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 if (isAndroid) { $('.in-banner .pic2').css('display','none'); $('.in-banner .pic').css('display','block') } }); })