jquery(function () { var ismobile, mobile = false; function initbox() { w_width = jquery(window).width(); w_height = jquery(window).height(); if (w_width <= 1024) { ismobile = true; } else if (w_width > 1024) { ismobile = false; }; //区分手机端和平板 if (w_width <= 740) { mobile = true; } else if (w_width > 740) { mobile = false; }; }; initbox(); jquery(window).resize(function () { initbox(); }); new swiper('.banner-swiper', { speed: 1300, slidesperview: 3, spacebetween : 32, centeredslides : true, loop: true, autoheight: true, grabcursor : true, updateonwindowresize: true, autoplay: true, navigation: { nextel: '.banner-prev.next', prevel: '.banner-prev.prev', }, breakpoints: { 750: { speed: 800, }, 320: { speed: 800, spacebetween : 0, slidesperview: 1, } } }); var solutes = new swiper('.solutes-swiper', { speed: 1000, slidesperview: 1, centeredslides : true, loop: false, autoheight: true, grabcursor : true, autoplay: false, effect : 'fade', on: { transitionstart: function(){ $(".solute-li li").eq(this.activeindex).addclass("active").siblings().removeclass("active"); if($(".solute-slide").eq(this.activeindex).find(".solute-text").hasclass("solute-color")){ $(".solute-li").addclass("soluteline") }else{ $(".solute-li").removeclass("soluteline") } } } }); $(".solute-li li").click(function(){ $(this).addclass("active").siblings().removeclass("active"); solutes.slideto($(this).index(), 1000, false) if($(".solute-slide").eq($(this).index()).find(".solute-text").hasclass("solute-color")){ $(".solute-li").addclass("soluteline") }else{ $(".solute-li").removeclass("soluteline") } }); new swiper('.activity-swiper', { speed: 1000, slidesperview: 1, loop: true, autoheight: true, autoplay: 4000, parallax : true, autoplay: true, // pagination : '.swiper-pagination', // paginationclickable: true, pagination: { el: '.swiper-pagination', clickable :true, }, }); // $(".brand-video").click(function(){ // var srcvideo = $(this).attr("data-video"); // if(srcvideo){ // $(".brand-pop").addclass("show"); // $(".bvideo").attr("src", srcvideo); // $(".bvideo")[0].play(); // } // }); // $(".pop-close").click(function(){ // $(".brand-pop").removeclass("show"); // $(".bvideo")[0].pause(); // }) })