/** * Created by Administrator on 2017/10/16. */ $(function(){ var str = ''; $(".tec_text_part").mouseover(function(){ $(this).addClass("box-Shadow"); }).mouseout(function(){ $(this).removeClass("box-Shadow"); }); $(".nav>li.on>a").append(str); $(".navbar-nav>li").mouseenter(function(){ $(this).find(".icon").css("background","url('wp-content/themes/hoko/images/icon_.png')"); $(this).find(".sub-menu").stop(true,true).slideDown(); }).mouseleave(function(){ $(this).find(".icon").css("background","url('wp-content/themes/hoko/images/icon.png')"); $(this).find(".sub-menu").slideUp(); }); $(".sub-menu>li").mouseenter(function(){ $(this).parents(".on").children("a").css("color","#15559d"); $(this).css("background","#f5f5f5"); $(this).children("a").css({"color":"#15559d"}); }).mouseleave(function(){ $(this).css("background","#fff"); $(this).parents(".on").children("a").css("color","#333333"); $(this).children("a").css({"color":"#333333"}); }); $(".list").mouseenter(function(){ $(this).children(".row").addClass("show"); $(this).siblings().children(".row").removeClass("show"); }); // $(".cat-item").mouseenter(function(){ // $(".children a").addClass("catitem"); // $(this).css("background","#f5f5f5"); // $(this).children("a").addClass("catitem"); // // $(this).children("a").css("color","#15559d"); // }).mouseleave(function(){ // $(".children a").removeClass("catitem"); // $(this).css("background","#fff"); // $(this).children("a").removeClass("catitem"); // }); }); //设为首页 function SetHome(obj,url){ try{ obj.style.behavior='url(#default#homepage)'; obj.setHomePage(url); }catch(e){ if(window.netscape){ try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }catch(e){ alert("抱歉,此操作被浏览器拒绝!\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'"); } }else{ alert("抱歉,您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。"); } } } //收藏本站 function AddFavorite(title, url) { try { window.external.addFavorite(url, title); } catch (e) { try { window.sidebar.addPanel(title, url, ""); } catch (e) { alert("抱歉,您所使用的浏览器无法完成此操作。\n\n加入收藏失败,请使用Ctrl+D进行添加"); } } } //保存到桌面 function toDesktop(sUrl,sName){ try { var WshShell = new ActiveXObject("WScript.Shell"); var oUrlLink = WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") + "\\" + sName + ".url"); oUrlLink.TargetPath = sUrl; oUrlLink.Save(); } catch(e) { alert("当前IE安全级别不允许操作!"); } }