//导航js $(function() { var ww = $(window).width(); if (ww > 1200) { $(".yx_hnyr_list").eq(0).show(""); $(".yx_hnl_ejtit").mouseenter(function() { var p_index = $(this).index(); $(this).addclass("yx_active").siblings("").removeclass("yx_active"); $(".yx_hnyr_list").eq(p_index).show("").siblings().hide(""); }); } else { $(".yx_navbtn").on('click', function() { $(this).toggleclass('yx_nav_active'); $(".yx_n_mo").toggleclass('yx_ncon_active').slidetoggle('slow'); }) //二级 $(".yx_ejbtn").on('click', function() { $(this).addclass("yx_rotate").parent().nextall(".yx_ejbox").slidetoggle('slow'); }) } }); $(window).scroll(function() { if ($(window).scrolltop() > 0) { $("#c_static_001-1661240275588").addclass('yx_header_active'); } else { $("#c_static_001-1661240275588").removeclass("yx_header_active"); } }); //毫欧热门产品 $require(['swiper'], function () { var inhonorswiper = new swiper('.inhonorswiper .swiper', { loop: true, slidesperview: 1, spacebetween: 10, breakpoints: { 768: { slidesperview: 2, spacebetween: 10 }, 1024: { slidesperview: 3, spacebetween: 18 }, 1440: { slidesperview: 4, spacebetween: 20 } }, navigation: { nextel: '.inhonorswiper_prev', prevel: '.inhonorswiper_next', }, autoplay: { delay: 5000, stoponlastslide: false, disableoninteraction: true, }, observer: true, observeparents: true, }); }); $(function () { //客服 $('.yx_kfclose').on('click', function(event){ $(".yx_kfbox").css({"display":"none"}); }); $(".yx_up_button").on("click", function () { $("html,body").stop().animate({ scrolltop: 0 }, 500); }); //锚点缓动 $('.yx_hd_btn').click(function(){ $('html,body').animate({scrolltop: ($($(this).attr('href')).offset().top -160 )},800); }); //移动端分类样式 $(".yx_mopagebtn").on('click',function(){ $(this).next().css("left","0px"); }); $(".yx_mopageclose").on('click',function(){ $(this).parent().css("left","100%"); }); //分类高亮背景 $(".yx_mopagebtn").parent().addclass("yx_npagebox"); //客服 $('.yx_kfclose').on('click', function(event){ $(".yx_kfbox").css({"display":"none"}); }); $(".yx_up_button").on("click", function () { $("html,body").stop().animate({ scrolltop: 0 }, 500); }); }); //wow初始化 wow = new wow({ animateclass: 'animated', }); wow.init();