$(function(){ //移动端二级导航 //二级导航 if(ispc()){ $('.nav li').hover(function(){ $(this).find('.nav_er').stop().fadein(200); },function(){ $(this).find('.nav_er').stop().fadeout(200); }); }else{ $('.nav>ul>li a').click(function(e){ if($(this).next('.nav_er').css('display')=='none'){ $(this).next('.nav_er').stop().fadein(200); e.preventdefault(); }else{ $(this).next('.nav_er').stop().fadeout(200); } }); } //导航按钮 $('.nav_btn').click(function(){ $('.header03').toggleclass('btn_click'); if($('.header03').hasclass('btn_click')){ $('.nav_er').hide(); } }); //首页移动端导航 $(window).resize(function(){ $('.header03 .nav>ul').css({ 'height':$(window).height()-70 }); //针对ipadpro设置样式 if($(window).height()>=1024 && $(window).width()<=1300){ $('body').removeclass('ipadpro1024'); $('body').addclass('ipadpro1366'); }else if($('.touch_body').size()>0 && $(window).width()>1300){ $('body').removeclass('ipadpro1366'); $('body').addclass('ipadpro1024'); } }).resize(); //搜索 $(".n_header .search").on("click",function(){$(".search-send").addclass("on");}); $(".search-send .close").on("click",function(){$(".search-send").removeclass("on");}); }) //判断是否ie浏览器 // alert(isie()) if(navigator.appname == "microsoft internet explorer"&&parseint(navigator.appversion.split(";")[1].replace(/[ ]/g, "").replace("msie",""))<9){ }else{ new wow().init(); } function isie() { if (!!window.activexobject || "activexobject" in window){ } } isie() function ispc() { var useragentinfo = navigator.useragent; var agents = new array("android", "iphone", "symbianos", "windows phone", "ipad", "ipod"); var flag = true; for (var v = 0; v < agents.length; v++) { if (useragentinfo.indexof(agents[v]) > 0) { flag = false; break; } } return flag; }