$(function(){ var wow = new wow({ boxclass: 'wow', animateclass: 'animated', offset: 0, mobile: true, live: true }); if (!(/msie [6|7|8|9]/i.test(navigator.useragent))) { new wow().init(); } /* 解决 移动设备 hover 二次点击 */ $(function () { $('.menunav li a').on('click touchend', function (e) { var el = $(this) var link = el.attr('href') window.location = link }) }) var w_width = $(window).width() /**/ $(".catalog").on("click", function () { $(".menupop").css("display", "block").animate({"left": "0"}, "200"); $(".maskbg").delay(100).show(0); }) $(".mclose").on("click", function () { $(".menupop").stop().animate({"left": "-100%"}, "400"); $(".maskbg").delay(100).hide(0); }) $(".maskbg").on("click", function () { $(".menupop").stop().animate({"left": "-100%"}, "400"); $(".maskbg").delay(100).hide(0); }) $(".menunav li.active .tem-first").click(function(){ $(this).parents().find("li").toggleclass("active"); }); var ifdt = $(".menunav li .item-first"), itdd = $(".menunav li .item-two"); ifdt.click(function () { var classname = $(this).parent().attr("class"); if (classname == "active") { $(this).parent().removeclass("active"); $(this).next(".item-two").slideup(400); } else { ifdt.parent().removeclass("active"); $(this).parent().addclass("active"); itdd.slideup(300); $(this).next(".item-two").slidedown(400); } }); // $('.header .search').click(function(){ // $('.dialog').fadein('fast'); // $('.dialog').addclass('on'); // // }) // $('.dialog .close').click(function(){ // $('.dialog').fadeout('fast'); // $('.dialog').removeclass('on'); // }) $(".header .h-search").click(function(){ $(".header .search-click").stop().slidetoggle(); }); $(".header .search-click .close").click(function(){ $('.header .search-click').stop().slideup(); }) // // var wh = $(window).outerheight(); // $(window).scroll(function(){ // if($(window).scrolltop() > wh*1.3) { // $(".goback").show(200); // } else { // $(".goback").hide(200); // } // }) /*返回顶部*/ $(".goback").on("click", function () { $('html,body').stop().animate({scrolltop: 0}, 1000); }) })