//判断系统 var os = function() { var ua = navigator.useragent, iswindowsphone = /(?:windows phone)/.test(ua), issymbian = /(?:symbianos)/.test(ua) || iswindowsphone, isandroid = /(?:android)/.test(ua), isfirefox = /(?:firefox)/.test(ua), ischrome = /(?:chrome|crios)/.test(ua), istablet = /(?:ipad|playbook)/.test(ua) || (isandroid && !/(?:mobile)/.test(ua)) || (isfirefox && /(?:tablet)/.test(ua)), isphone = /(?:iphone)/.test(ua) && !istablet, ispc = !isphone && !isandroid && !issymbian; return { istablet: istablet, isphone: isphone, isandroid : isandroid, ispc : ispc }; }(); //二级导航 $(document).ready(function(){ if(os.isandroid || os.isphone){ } else { $(document).off('click.zui.dropdown.data-api'); } //自动展开 $('.nav .dropdown').mouseenter(function(){ $(this).addclass('open'); }); //自动关闭 $('.nav .dropdown').mouseleave(function(){ $(this).removeclass('open'); }); });