// fixed-top $(window).scroll(function() { if($(window).scrollTop() <100) { $('.header').removeClass('on'); } else { $('.header').addClass('on'); } }); $(function(){ var isShow = false; $(".mc_search").click(function () { if (!isShow) { $(this).addClass("isshow"); $(".mc_search_xl").slideDown().addClass("show"); isShow = true; } else { $(this).removeClass("isshow"); $(".mc_search_xl").slideUp().removeClass("show"); isShow = false; } }) $(".mc_search_xl").mouseleave(function (){ $(".mc_search").removeClass("isshow"); $(this).slideUp().removeClass("show"); isShow = false; }); $(".btn1 .mc_search,#lightbox").click(function () { $(".nav-switch").removeClass("nav-open"); $(".navbar-body").hide(); $("#lightbox").hide(); }); var _winw = $(window).width(); if( _winw<=950 ){ $(".topnav .navdown a").click(function () { $(".nav-switch").removeClass("nav-open"); $(".navbar-body").hide(); $("#lightbox").hide(); }); } // mobile menu $('.nav li i.arrow').click(function(){ $(this).toggleClass('on'); $(this).next('.navdown').slideToggle(); $(this).parent('li').siblings().children('ul').slideUp(); $(this).parent('li').siblings().children('i').removeClass('on') }); $('.nav li').mouseover(function(){ $('.nav li .on').addClass('nothis') }).mouseout(function(){ $('.nav li .on').removeClass('nothis') }); $(".nav-switch").click(function (){ $(".mc_search").removeClass("isshow"); $(".mc_search_xl").slideUp().removeClass("show"); $("#lightbox").toggle(); isShow = false; }); $('#lxwm-zhaoxian').fold({ "toggle":"#lxwm-zhaoxian .offerBtn .fold-head", "target":"#lxwm-zhaoxian .offerBtn .info" }); $('.offerBtn').on('click',function(e){ $(this).siblings().find('i').removeClass('fa-minus-circle'); $(this).siblings().find('i').addClass('fa-plus-circle'); $(this).find('i').toggleClass('fa-plus-circle fa-minus-circle'); }); $('.p1').click(function(){ $('#sp1').show(); $('.fnt').addClass('opactiy'); $('.p1').hide(); document.getElementById('sp1').play(); }); $('#flip1').flip({ "autoplay":true, "page":false, "interval":8, "prev":"#flip-prev1", "next":"#flip-next1", }); $('.tab_ul li').click(function(){ $(this).addClass('on').siblings().removeClass('on'); var idx = $(this).index(); $('.tablist .tabitem').eq(idx).fadeIn().siblings().hide(); }); // 锚点 $().scroll({ "toggle":".aboutnav li", "target":"body .scrollto", }); $('.section5 .vmore .dd').click(function(){ $(this).addClass('on').siblings().removeClass('on'); var idx = $(this).index(); $('.section5 .item_list').eq(idx).fadeIn().siblings().hide(); }) }); // 客服 function goTop() { $('html,body').animate({ 'scrollTop': 0 }, 1000); } function headscroll() { var scrollTop = $(this).scrollTop(); if (scrollTop > 0) { $(".fixdright .top").addClass("on"); } else { $(".fixdright .top").removeClass("on"); } }; headscroll(); $(window).scroll(function() { headscroll(); var scrollTop1 = $(this).scrollTop(); if (scrollTop1 > 200) { $(".fixdright .top").addClass("on"); } else { $(".fixdright .top").removeClass("on"); } });