$(function() { $('.jzk_product_r1 li').hover(function(){ $(this).addclass('hover').siblings().removeclass('hover'); $('.jzk_product_r2 .kx_b').eq($(this).index()).show().siblings().hide(); }); $('.kx_top3').hover(function(){ $(this).children('ul').stop(0, 0).slidetoggle('fast'); }); $('.jzk_nav_boxa8 li').hover(function(){ $(this).siblings().find('a').removeclass('hover') $(this).find('a').addclass('hover'); $('.jzk_nav_boxa9 .jzk_t').eq($(this).index()).addclass('hover').siblings().removeclass('hover'); }); $('.jzk_nav_boxa10 li').hover(function(){ $(this).siblings().find('a').removeclass('hover') $(this).find('a').addclass('hover'); }); $('.jzk_nav_boxa5 li').hover(function(){ $('.jzk_nav_boxa9 .jzk_t.hover .jzk_nav_boxa5 li a').removeclass('hover') $(this).find('a').addclass('hover'); $('.jzk_nav_boxa9 .jzk_t.hover .jzk_nav_boxa6 ul').eq($(this).index()).addclass('hover').siblings().removeclass('hover'); $('.jzk_nav_boxa9 .jzk_t.hover .jzk_nav_boxa7 .jzk_nav_boxaxx').eq($(this).index()).addclass('hover').siblings().removeclass('hover'); }); $('.jzk_nav_boxa6 li').hover(function(){ $('.jzk_nav_boxa9 .jzk_t.hover .jzk_nav_boxa6 li a').removeclass('hover') $(this).find('a').addclass('hover'); console.log($(this).index()); $('.jzk_nav_boxa9 .jzk_t.hover .jzk_nav_boxa7 .jzk_nav_boxaxx.hover a').eq($(this).index()).addclass('hover').siblings().removeclass('hover'); }); $('.certifyp a').click(function(){ $(this).addclass('hover').siblings().removeclass('hover'); $('.certify .certifyson').eq($(this).index()).css({opacity: 1,height:'auto',overflow: 'hidden'}).siblings().css({opacity: 0,height:0,overflow: 'hidden'}); }); $('.cunm a').click(function(){ $(this).addclass('hv').siblings().removeclass('hv'); $('.kx_inews_box .kx_inews').eq($(this).index()).css({opacity: 1,height:'auto',overflow: 'hidden'}).siblings().css({opacity: 0,height:0,overflow: 'hidden'}); }); // $('.kx_isolup a').click(function(){ // $(this).addclass('hover').siblings().removeclass('hover'); // $('.kx_isol ul').eq($(this).index()).show().siblings().hide(); // }); certifyswiper = new swiper('#certify .swiper-container', { watchslidesprogress: true, slidesperview: 'auto', centeredslides: true, loop: true, loopedslides: 5, autoplay: true, navigation: { nextel: '#certify .swiper-button-next', prevel: '#certify .swiper-button-prev', }, pagination: { el: '#certify .swiper-pagination', //clickable :true, }, on: { progress: function(progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideprogress = this.slides[i].progress; modify = 1; if (math.abs(slideprogress) > 1) { modify = (math.abs(slideprogress) - 1) * 0.3 + 1; } translate = slideprogress * modify * 260 + 'px'; scale = 1 - math.abs(slideprogress) / 5; zindex = 999 - math.abs(math.round(10 * slideprogress)); slide.transform('translatex(' + translate + ') scale(' + scale + ')'); slide.css('zindex', zindex); slide.css('opacity', 1); if (math.abs(slideprogress) > 3) { slide.css('opacity', 0); } } }, settransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); $(".jzk_toggle_01").on('click', function() { $(this).parent().toggleclass('jzk_open'); $('.head_nav .jzk_box> ul').stop(0, 0).slidetoggle('fast'); }); $('.head_nav li').click(function(){ $(this).addclass('hv').siblings().removeclass('hv'); }); if($(window).width()<767){ $('.head_nav li').has('ul').find('a').attr({'href':'javascript:;'}); } $(window).resize(function() { if($(window).width()<767){ $('.head_nav li').has('ul').find('a').attr({'href':'javascript:;'}); } }); certifyswiper = new swiper('#certify2 .swiper-container', { watchslidesprogress: true, slidesperview: 'auto', centeredslides: true, loop: true, loopedslides: 5, autoplay: true, navigation: { nextel: '#certify2 .swiper-button-next', prevel: '#certify2 .swiper-button-prev', }, pagination: { el: '#certify2 .swiper-pagination', //clickable :true, }, on: { progress: function(progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideprogress = this.slides[i].progress; modify = 1; if (math.abs(slideprogress) > 1) { modify = (math.abs(slideprogress) - 1) * 0.3 + 1; } translate = slideprogress * modify * 260 + 'px'; scale = 1 - math.abs(slideprogress) / 5; zindex = 999 - math.abs(math.round(10 * slideprogress)); slide.transform('translatex(' + translate + ') scale(' + scale + ')'); slide.css('zindex', zindex); slide.css('opacity', 1); if (math.abs(slideprogress) > 3) { slide.css('opacity', 0); } } }, settransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); //切换 $.extend({ "swiperoption": function(f1, f2, f3, f4) { new swiper(f1, { slidesperview: 'auto', autoplay: true, loop: 1, navigation: { nextel: f2, prevel: f3, }, pagination: { el: f4, clickable: true, } }); }, }); $(".swiper_box").each(function(index) { $.swiperoption($(this), $(this).find(".swiper-button-next"), $(this).find(".swiper-button-prev"), $(this).find(".swiper-pagination")); }); $(".jzk_banner").each(function(index) { $.swiperoption($(this), $(this).find(".swiper-button-next"), $(this).find(".swiper-button-prev"), $(this).find( ".swiper-pagination")); }); //切换 $(".jzk_tab li").on("click", function() { $(this).addclass('jzk_active').siblings().removeclass('jzk_active'); $(this).parents('.layui-container').find(".jzk_tab_box ul").eq($(this).index()).addclass( 'layui-anim layui-anim-scale jzk_active').siblings().addclass('jzk_none').removeclass('jzk_active'); }); //banner漂浮导航 if ($('.jzk_banner').length) { jzk_banner_h = $('.jzk_banner').height(); $('.jzk_banner_nav01').show().css({ 'height': jzk_banner_h, 'bottom': -jzk_banner_h }); $('.jzk_banner_nav01 ul ul').css({ 'height': jzk_banner_h }); $('.jzk_banner_nav01 li').hover(function() { $(this).toggleclass('hover').find('ul').stop(0, 0).toggle(); }); } //产品详情 if ($('.jzk_product_show1').length) { $(".jzk_product_showtag a").on("click", function() { $(this).addclass('jzk_hover').siblings().removeclass('jzk_hover'); $('.jzk_product_showb .jzk_b').hide(); $('.jzk_product_showb .jzk_b').eq($(this).index()).show(); }); } //产品导航 if ($('.jzk_product_sub').length) { $('.jzk_product_sub li').has('ul').hover(function() { $(this).find('ul').stop(0, 0).toggle(); }); } // 返回顶部 if ($('.jzk_scroll_top').length) { $(window).scroll(function() { if ($(this).scrolltop() > $(this).height()) { $(".jzk_scroll_top").show(); } else { $(".jzk_scroll_top").hide(); } }); $(".jzk_scroll_top").click( function(){$('html,body').animate({scrolltop:'0px'},'slow'); }) } /*响应式表格*/ if ($('table').length) { $('table').wrap("
"); } /*用户头部*/ if ($('.jzk_user_banner .jzk_box .jzk_r .jzk_r2').length) { $('.jzk_user_banner .jzk_box .jzk_r .jzk_r2').hover(function(){ $(this).find('ul').toggle(); }); } //产品栏目左右等高 function allh(t) { var height = 0; t.each(function(i) { if (height < t.eq(i).height()) { height = t.eq(i).height(); } }); return height; } function allh2(t) { var height = 0; t.each(function(i) { if (height < t.eq(i).find('.jzk_item').height()) { height = t.eq(i).find('.jzk_item').height(); } }); t.find('.jzk_item').height(height); } allh2($('.jzk_index2 .jzk_son_4>div')); $(window).resize(function() { $('.jzk_index2 .jzk_son_4>div .jzk_item').removeattr('style'); allh2($('.jzk_index2 .jzk_son_4>div')); }); }); //滚动元素动画 aos.init({ offset: 200, duration: 600, easing: 'ease-in-sine', delay: 100, }); $(window).load(function(){ });