$(document).ready(function () { // $('#dowebok').fullpage(); //导航展开收缩 $('.nav-btn').hover(function () { if ($("body").hasclass("products-innerpage")) $(this).removeclass('productinner-nav-btn'); $(this).addclass("showmenu"); $(".nav-bar").stop().slidedown(500, function () { $(".nav-bar").css("height", "auto"); }); }, function (e) { if ($("body").hasclass("products-innerpage")) $(this).addclass('productinner-nav-btn'); $(this).removeclass("showmenu"); $(".nav-bar").stop().slideup(500, function () { $(".nav-bar").css("height", "auto"); }); }); //展开下级菜单 $('.menu-tab.par').on('click', function (event) { event.preventdefault(); $(this).parent('.nav-item').addclass("active").siblings().removeclass('active'); if ($(this).hasclass('show-sub')) { $(this).removeclass('show-sub'); $(this).next('.menu-sub').slideup(500); } else { $('.menu-tab').removeclass('show-sub') $(this).addclass('show-sub'); $('.menu-sub').slideup(500); $(this).next('.menu-sub').slidedown(500); } }); //鼠标经过事件 $('.menu-tab').hover(function () { $(this).parent('.nav-item').addclass("active").siblings().removeclass('active'); }, function () { if (!$(this).hasclass('show-sub')) { $('.nav-item').removeclass('active'); } }); $('.menu-tab').click(function () { $(this).parent('.nav-item').addclass("active").siblings().removeclass('active'); }); //显示微信二维码 $('.wechat').hover(function(){ $('.wechat-code').css({"display":"block"}); }) $('.wechat').mouseout(function(){ $('.wechat-code').css({"display":"none"}); }) // var w = $(window).width() // console.log(w) // if(w<=768){ // $(".swiper-container.swiper-container-h").hide() // $(".swiper2").show() // $(".big-img").hide() // $(".small-img").show() // } });