var yy = {}; yy.init = function(){ yy.events(); //事件总体控制 } //事件总体控制 yy.events = function(){ yy.nav(); yy.scroll(); yy.share(); yy.wow(); } //导航 yy.nav = function(){ $(".nav_btn").click(function(){ $(this).toggleClass("openNav"); $(".nav .nav_list").slideToggle(); $("body").toggleClass("ofhidden"); }); if($(window).width() <= 520){ $(".nav_list .nav_a>a").click(function(e){ e.preventDefault(); $(this).parent().find(".nav_nd").slideToggle(); $(this).parents().siblings().find(".nav_nd").slideUp(); }); } if($(window).width() < 750){ $(".in_top .in_T").click(function(){ $(".in_top .in_nav").slideToggle(); }); } } //滚动事件 yy.scroll = function(){ } yy.share = function(){ window._bd_share_config={ "common":{ "bdSnsKey":{}, "bdText":"", "bdMini":"2", "bdMiniList":false, "bdPic":"", "bdStyle":"0", "bdSize":"24" }, "share":{} }; with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)]; } yy.wow=function(){ if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ var wow = new WOW({ boxClass: 'wow', // animated element css class (default is wow) animateClass: 'animated', // animation css class (default is animated) offset: 50, // distance to the element when triggering the animation (default is 0) mobile: true, // trigger animations on mobile devices (default is true) live: true, // act on asynchronously loaded content (default is true) callback: function(box) { // the callback is fired every time an animation is started // the argument that is passed in is the DOM node being animated } }); wow.init(); }; } //dom加载完毕执行 $(function(){ yy.init(); });