var lm = {}; lm.init = function(){ lm.events(); //浜嬩欢鎬讳綋鎺у埗 } //浜嬩欢鎬讳綋鎺у埗 lm.events = function(){ lm.nav(); lm.scroll(); lm.wow(); } //瀵艰埅 lm.nav = function(){ $(".nav_btn").click(function(){ $(this).toggleClass("openNav"); $(".head .nav").slideToggle(); $("body").toggleClass("ofhidden"); }); $(".nav li>a").click(function(e){ if($(this).siblings(".nav_er").find("a").length >0 && $(window).width() <= 1025) { e.preventDefault(); $(this).parent().find(".nav_er").slideToggle(); $(this).parents().siblings().find(".nav_er").slideUp(); } }); } //婊氬姩浜嬩欢 lm.scroll = function(){ $(".bottom select").change(function(){ var newSrc = $(this).val(); if (newSrc != "") { window.open(newSrc); } }); } lm.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(){ lm.init(); });