//banner $('.index_banner').slick({ autoplay: false, arrows: false, dots: false, infinite: true, speed: 500, autoplaySpeed: 8900, pauseOnHover: false, fade: true, responsive: [{ breakpoint: 992, settings: { dots: true } }] }); // 鏂伴椈鍒囨崲 var code = 0 $('.switch-btn span').click(function(params) { $(this).addClass('active').siblings().removeClass('active') }) $('.index_banner').init(function(slick) { $('.index_banner .item.slick-current').addClass('active').siblings().removeClass('active') }) $('.index_banner').on('afterChange', function(slick, currentSlide) { $('.index_banner .item.slick-current').addClass('active').siblings().removeClass('active'); var _index = $('.index_banner').slick('slickCurrentSlide') if(_index == 0){ $('.one').addClass('one1 animated fadeInUp') $('.tow').removeClass('tow2 animated fadeInLeft') $('.justctn').removeClass('justctn3 animated fadeInUp') $('.cloud2-1').removeClass('cloud2-1s animated fadeInRight') $('.cdd').addClass('one1 animated fadeInUp') } if(_index == 1){ $('.one').removeClass('one1 animated fadeInUp') $('.justctn').removeClass('justctn3 animated fadeInUp') $('.tow').addClass('tow2 animated fadeInLeft').css('animation-delay', '.1s'); $('.cloud2-1').addClass('cloud2-1 animated fadeInRight') $('.cdd').removeClass('one1 animated fadeInUp') } if(_index == 2){ $('.one').removeClass('one1 animated fadeInUp') $('.tow').removeClass('tow2 animated fadeInLeft') $('.cloud2-1').removeClass('cloud2-1s animated fadeInRight') $('.justctn').addClass('justctn3 animated fadeInUp').css('animation-delay', '.1s'); $('.cdd').removeClass('one1 animated fadeInUp') } $('.section1 .number p').eq(_index).addClass('active').siblings().removeClass('active') }) $('.section1 .number p').click(function() { var _index = $(this).index(); if(_index == 0){ $('.one').addClass('one1 animated fadeInLeft') $('.tow').removeClass('tow2 animated fadeInLeft') $('.justctn').removeClass('justctn3 animated fadeInUp') } if(_index == 1){ $('.one').addClass('one1 animated fadeInLeft') $('.justctn').removeClass('justctn3 animated fadeInUp') $('.tow').addClass('tow2 animated fadeInLeft').css('animation-delay', '.1s'); } if(_index == 2){ $('.one').addClass('one1 animated fadeInLeft') $('.tow').removeClass('tow2 animated fadeInLeft') $('.justctn').addClass('justctn3 animated fadeInUp').css('animation-delay', '.1s'); } $('.index_banner').slick('slickGoTo', _index); $(this).addClass("active").siblings().removeClass("active") }); $('.section1 .prev').click(function() { $('.index_banner').slick('slickPrev') }) $('.section1 .next').click(function() { $('.index_banner').slick('slickNext'); }); // 榧犳爣绉讳笂鏄剧ず浜岀淮鐮 $('.sss a').mouseover(function() { if ($(this).index() == 0) { $('.gywm-img img').attr('src', '/static/cn/img/ewm.jpeg') $('.gywm-img img').css({ 'display': 'block' }) } if ($(this).index() == 1) { $('.gywm-img img').attr('src', '/static/cn/img/wb_ewm.jpeg') $('.gywm-img img').css({ 'display': 'block' }) } }) $('.sss').mouseout(function() { $('.gywm-img img').css({ 'display': 'none' }) }) var code = 0 // 鐐瑰嚮灏忕偣鍒囨崲 $('.boo-page li').click(function() { code = $(this).index() $(this).addClass('active').siblings().removeClass('active') $('.pcws').find('.ners_list').eq(code).css({ 'display': 'block' }).siblings().css({ 'display': 'none' }) $('.news-right').find('a').eq(code).css({ 'display': 'block' }).siblings().css({ 'display': 'none' }) }) // 鐐瑰嚮鎸夐挳鍒囨崲 $('.boo-k .boo-le').click(function() { if ($(this).index() == 1) { code += 1 if (code > 3) { code = 3 return } console.log(code) $('.boo-page').find('li').eq(code).addClass('active').siblings().removeClass('active') $('.pcws').find('.ners_list').eq(code).css({ 'display': 'block' }).siblings().css({ 'display': 'none' }) $('.news-right').find('a').eq(code).css({ 'display': 'block' }).siblings().css({ 'display': 'none' }) } else { code -= 1 if (code < 0) { code = 0 return } console.log(code) $('.boo-page').find('li').eq(code).addClass('active').siblings().removeClass('active') $('.pcws').find('.ners_list').eq(code).css({ 'display': 'block' }).siblings().css({ 'display': 'none' }) $('.news-right').find('a').eq(code).css({ 'display': 'block' }).siblings().css({ 'display': 'none' }) } }) //瀵艰埅 //瓒呰繃涓€瀹氶珮搴﹀鑸坊鍔犵被鍚 var nav = $("header"); //寰楀埌瀵艰埅瀵硅薄 var win = $(window); //寰楀埌绐楀彛瀵硅薄 var sc = $(document); //寰楀埌document鏂囨。瀵硅薄銆 win.scroll(function() { if (sc.scrollTop() >= 100) { nav.addClass("on"); } else { nav.removeClass("on"); } }) //绉诲姩绔睍寮€nav $('#navToggle').on('click', function() { $('.m_nav').addClass('open'); }) //鍏抽棴nav $('.m_nav .top .closed').on('click', function() { $('.m_nav').removeClass('open'); }) //浜岀骇瀵艰埅 绉诲姩绔 $(".m_nav .ul li").click(function() { $(this).children("div.dropdown_menu").slideToggle('slow') $(this).siblings('li').children('.dropdown_menu').slideUp('slow'); }); // 鏄剧ず浜岀骇瀵艰埅 $(".navbar_nav li").mouseover(function() { if($(this).index() == 1){ $('#ckls .opidSx').show() }else{ $('#ckls .opidSx').hide() } if($(this).index() == 5){ $('#cklex .opidSx').show() }else{ $('#cklex .opidSx').hide() } if($(this).index() == 6){ $('#ckls .opidSxs').show() }else{ $('#ckls .opidSxs').hide() } $(this).children('.dropdown_menu').css({ 'display': 'block' }) $(this).siblings().children('.dropdown_menu').css({ 'display': 'none' }) }); $(".navbar_nav li .dropdown_menu").mouseout(function() { $(this).css({ 'display': 'none' }) }); $('.navbar_nav').mouseout(function() { $('.dropdown_menu').hide() }); // 瀵艰埅鏂版坊鍔 $('#ckls .opidSx,#ckls a').mouseout(function(){ $('#ckls .opidSx').hide() }) $('#cklex .opidSx,#cklex a').mouseout(function(){ $('#cklex .opidSx').hide() }) var codes = 0 $('.header_wap .container').click(function() { if (codes == 0) { codes = 1 $('.dhlist').show() $('.lopsw').attr('src', '/static/cn/img/wap/img-wap-13.png') $('.container').css({ 'background': '#ffffff' }) $('.img22').show() $('.img11').hide() } else { codes = 0 $('.img22').hide() $('.img11').show() $('.dhlist').hide() $('.lopsw').attr('src', '/static/cn/img/wap/img-wap-12.png') $('.container').css({ 'background': 'rgba(28, 35, 39, 0.8)' }) } }) var posc = 0 $('.dhlist .list_dh').click(function() { if (posc == $(this).index()) { posc = $(this).index() - 1 $(this).find('.dh_ej').css({ 'display': 'none' }) $(this).find('.clod_dh img').attr('src', '/static/cn/img/wap/img-wap-11.png') } else { posc = $(this).index() $(this).find('.dh_ej').css({ 'display': 'block' }) $(this).find('.clod_dh img').attr('src', '/static/cn/img/wap/img-wap-10.png') $(this).siblings().find('.dh_ej').css({ 'display': 'none' }) $(this).siblings().find('.clod_dh img').attr('src', '/static/cn/img/wap/img-wap-11.png') } }) $('.switch-btns span').click(function() { $(this).addClass('activev') $(this).siblings().removeClass('activev') }) $('#lopspw div').click(function() { $('.ekls').show() if ($(this).index() == 1) { $('.ekls').attr('src', '/static/cn/img/ewm.jpeg') } else { $('.ekls').attr('src', '/static/cn/img/wb_ewm.jpeg') } }) var poscs = 0 $('.dhlists .list_dh').click(function() { if (poscs == $(this).index()) { poscs = $(this).index() - 1 $(this).find('.dh_ej').css({ 'display': 'none' }) $(this).find('.clod_dh img').attr('src', '/static/cn/img/wap/img-wap-11.png') } else { poscs = $(this).index() $(this).find('.dh_ej').css({ 'display': 'block' }) $(this).find('.clod_dh img').attr('src', '/static/cn/img/wap/img-wap-10.png') $(this).siblings().find('.dh_ej').css({ 'display': 'none' }) $(this).siblings().find('.clod_dh img').attr('src', '/static/cn/img/wap/img-wap-11.png') } }) var cookiename = 'SD_WEB_LANG'; $("div.switch_version").on("click","span",function(){ var s_version = $(this).text(); //alert(s_version);return false; if(s_version == 'CN'){ s_version = 'ZHCN'; } setCookie(cookiename,s_version,1); if (s_version == 'ZHCN'){ url = location.href.replace('/en/','/'); }else { var arr = location.href.replace('/en/','/').split('/'); arr.splice(3,0,"en"); url = arr.join("/"); } window.location.href = url; }); function setCookie(cname, cvalue, exdays) //cookies璁剧疆 { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires + ";path=/"; } //鍏ㄥ睆婊氬姩 // $('#index_main').fullpage({ // 'navigation': true, // slidesNavigation: true, // controlArrows: false, // continuousHorizontal: true, // scrollingSpeed: 1000, // showActiveTooltip: true, // scrollOverflow: true, // anchors: ['hero', 'one', 'two', 'three'], // loopHorizontal: true, // afterLoad: function(anchorLink, index) { // if (index == 1) { // $('header').removeClass('on'); // } // if (index == 2) { // $('header').addClass('on'); // $('.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 (index == 3) { // $('header').addClass('on'); // $('.section3 h3').addClass('animated fadeInUp').css('animation-delay', '.1s'); // $('.section3 .Vehicle').addClass('animated fadeInLeft').css('animation-delay', '.1s'); // $("body").css("overflow", "hidden"); // } // if (index == 4) { // $('header').addClass('on'); // $('.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'); // $('.newslist').addClass('animated fadeInLeft').css('animation-delay', '.3s'); // } // }, // onLeave: function(index, direction) {} // })