// 婊氬姩鍔犺浇 鍔ㄧ敾 $(document).scroll(function() { // 婊氬姩璺濈 var top = $(document).scrollTop(); if (top > $('.section1').position().top - 200) { } if (top > $('.section2').position().top - 400) { $('.product-bg').css({'opacity':1}) $('.section2 h2').addClass('animated fadeInUp').css('animation-delay', '.1s'); $('.section2 h3').addClass('animated fadeInUp').css('animation-delay', '.1s'); $('.product-bg .mores').addClass('animated fadeInLeft').css('animation-delay', '.1s'); $('.product-bg .xzd').addClass('animated fadeInLeft').css('animation-delay', '.1s'); $('.product-bg .car').addClass('animated fadeInRight').css('animation-delay', '.1s'); } if (top > $('.section3').position().top - 400) { $('.Vehicle').css({'opacity':1}) $('.section3 h3').addClass('animated fadeInUp').css('animation-delay', '.1s'); $('.section3 .Vehicle').addClass('animated fadeInLeft').css('animation-delay', '.1s'); } if (top > $('.section4').position().top - 400) { $('.news-box').css({'opacity':1}) $('.section4 h3').addClass('animated fadeInUp').css('animation-delay', '.1s'); $('.section4 .boo-page').addClass('animated fadeInLeft').css('animation-delay', '.1s'); $('.section4 .transition').addClass('animated fadeInRight').css('animation-delay', '.1s'); $('.title').addClass('animated fadeInLeft').css('animation-delay', '.3s'); $('#newers').addClass('animated fadeInLeft').css('animation-delay', '.3s'); if ($(document.body).width() <= 750) { $('.news-right').addClass('animated fadeInLeft').css('animation-delay', '.1s'); $('.ners_list').addClass('animated fadeInRight').css('animation-delay', '.1s'); } } }); (window.onresize = function() { indexCode = 0 //绗簩灞忓浘鏍囧垏鎹 // 閫傞厤鎵嬫満绔 鍘绘帀瑙掓爣 if ($(document.body).width() <= 750) { indexCode = 1 // $(".section4 .fp-tableCell").css({ // "width": $(document.body).width() + 30 + 'px', // "overflow-y": "scroll", // "display": "block" // }); $('.inner p>span').hide() // 鎵嬫満绔垏鎹if $('.controls').hide() $('.wap-gif').show() } else { // 杩樺師灞炴€ indexCode = 0 // $(".section4 .fp-tableCell").css({ // "width": 'auto', // "overflow-y": "hidden", // "display": "table-cell" // }); $('.inner p>span').show() // PC绔垏鎹㈣棰 $('.controls').show() $('.wap-gif').hide() } })(); // $('.section4 .fp-tableCell').css({'width':document.body.clientWidth}) var mySwiper = new Swiper('.swiper-container', { autoplay: 5000,//鍙€夐€夐」锛岃嚜鍔ㄦ粦鍔 pagination : '.swiper-pagination', paginationClickable :true, autoplayDisableOnInteraction : false, onSlideChangeEnd: function(swiper){ }, onClick:function (swiper){ // console.log(swiper.activeIndex,123) // $('.xzd li a').removeClass('active') // $('.xzd li:eq('+ swiper.activeIndex +')').find('a').addClass('active') }, }) $('.xzd .kles').click(function() { console.log($(this).index(),000) if ($(this).index() == 0) { mySwiper[0].slideTo(0, 1000, false) } if ($(this).index() == 1) { mySwiper[0].slideTo(1, 1000, false) } if ($(this).index() == 2) { mySwiper[0].slideTo(2, 1000, false) } if ($(this).index() == 3) { mySwiper[0].slideTo(3, 1000, false) } }) $('.xzd .apc').mousemove(function() { $(this).children().addClass('active') $(this).siblings().children().removeClass('active') if ($(this).index() == 0) { mySwiper[0].slideTo(0, 1000, false) $('.canshu h2').text('鍏ㄥ満鏅鐩栬溅瑙勫鐞嗗櫒') $('.canshu h3').text('鏋佽嚧浜や簰鐨勫骇鑸变綋楠?) if (indexCode == 0) { // pc绔浘鐗 $('.car').attr('src', '/static/cn/img/index-ima/che01.png') }else{ // 绉诲姩绔浘鐗 $('.car').attr('src', '/static/cn/img/index-ima/wap-che01.png') } $('.mores a').attr("href",'/product/X9') } if ($(this).index() == 1) { mySwiper[0].slideTo(1, 1000, false) $('.canshu h2').text('鍏ㄥ満鏅鐩栬溅瑙勫鐞嗗櫒') $('.canshu h3').text('闈㈠悜閲忎骇鐨勬櫤鑳介┚椹?) if (indexCode == 0) { $('.car').attr('src', '/static/cn/img/index-ima/che02.png') }else{ // 绉诲姩绔浘鐗 $('.car').attr('src', '/static/cn/img/index-ima/wap-che02.png') } $('.mores a').attr("href",'/product/V9') } if ($(this).index() == 2) { mySwiper[0].slideTo(2, 1000, false) $('.canshu h2').text('鍏ㄥ満鏅鐩栬溅瑙勫鐞嗗櫒') $('.canshu h3').text('楂樻晥瀹夊叏鐨勬暟鎹氦浜?) if (indexCode == 0) { $('.car').attr('src', '/static/cn/img/index-ima/che03.png') }else{ // 绉诲姩绔浘鐗 $('.car').attr('src', '/static/cn/img/index-ima/wap-che03.png') } $('.mores a').attr("href",'/product/G9') } if ($(this).index() == 3) { mySwiper[0].slideTo(3, 1000, false) $('.canshu h2').text('鍏ㄥ満鏅鐩栬溅瑙勫鐞嗗櫒') $('.canshu h3').text('鏁忔嵎绮惧噯鐨勬帶鍒跺崟鍏?) if (indexCode == 0) { $('.car').attr('src', '/static/cn/img/index-ima/che04.png') }else{ // 绉诲姩绔浘鐗 $('.car').attr('src', '/static/cn/img/index-ima/wap-che04.png') } $('.mores a').attr("href",'/product/E3') } })