//手机导航toggle function phonenavtoggle() { if ($("#phone-nav").hasclass("active")) { $("#phone-nav").animate({ "right": '-100%' }); $("#phone-nav").removeclass("active") } else { $("#phone-nav").animate({ "right": 0 }) $("#phone-nav").addclass("active") } } $(".nav-box ul li > a").click(function(){ $(this).parent("li").toggleclass("on").siblings().removeclass("on"); $(this).next(".list").slidetoggle(500).parent().siblings("li").children(".list").slideup(500) }) function menutoggle(){ $(".header-section .nav-icon").toggleclass("on") $(".shadow").toggle() $(".nav-box").toggleclass("on") } // $(window).on("scroll", function(){ // var top = $(window).scrolltop(); // if(top > 10) { // $(".second-nav-box .item").hide() // } // if(top > 100) { // $(".header-section").hide(); // }else { // $(".header-section").show(); // } // }) var wid = $("body,html").width() if(wid < 1004) { $(window).on("scroll", function(){ var top = $(window).scrolltop(); if(top > 50) { $(".header-section").addclass("on"); }else { $(".header-section").removeclass("on"); } }) }else{ } //$(function(){ // new wow().init(); //}) // 手机回到顶部 function gotop() { $("body,html").animate({ scrolltop: 0 }, 800); } function itemtoggle(obj) { var status = $(obj).attr('data-status'); if (status == 0) { $(obj).addclass("extend") $(obj).attr('data-status', 1) } else { $(obj).removeclass("extend") $(obj).attr('data-status', 0) } } fontsize(); $(window).resize(function(){ fontsize(); }); function fontsize(){ var size; var winw = $(window).width(); if(winw<=1650 && winw>800){ size=math.round(winw/16.5); }else if(winw<=800){ size=math.round(winw/7.5); if(size>65){ size=65; } }else{ size=100; } $('html').css({ 'font-size':size+'px' }) }