Created
October 23, 2010 00:51
-
-
Save vayn/641620 to your computer and use it in GitHub Desktop.
theoutlookmagazine.com navBar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfHover = function() { | |
var sfEl = document.getElementById("menu"); | |
if(sfEl){ | |
var sfEls = document.getElementById("menu").getElementsByTagName("LI"); | |
for (var i=0; i<sfEls.length; i++) { | |
sfEls[i].onmouseover=function() { | |
this.className+=" sfhover"; | |
} | |
sfEls[i].onmouseout=function() { | |
this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); | |
} | |
} | |
} | |
} | |
if (window.attachEvent) window.attachEvent("onload", sfHover); | |
$(document).ready(function(){ | |
$("li.top a").each(function(){ | |
var info = $(this); | |
var width = $(this).width(); | |
var o_text = $(this).html(); | |
var re_text = $(this).attr('title'); | |
var hideDelay = 100; | |
var hideDelayTimer = null; | |
$([info.get(0)]).mouseover(function (){ | |
info.css('width',width); | |
info.html(re_text); | |
}).mouseout(function () { | |
info.html(o_text); | |
}); | |
}); | |
$("a.new_win").click(function() { | |
var $link = $(this).attr('href'); | |
if(!window.open($link,"tom_window","toolbar=0,resizable=1,scrollbars=yes,status=1,width=700,height=710")){ | |
location.href=$link; | |
} | |
return false; | |
}); | |
}); | |
/* | |
<ul id="menu" class="clearit"> | |
<li class="top current"><a href="http://www.theoutlookmagazine.com/" title="首页" class="l">HOME</a><!--<ul>首页</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/about" title="关于我们"> ABOUT </a><!--<ul>关于我们</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/magazine/" title="杂志">MAGAZINE</a> | |
<ul class="sub"> | |
<li class=""><a href="http://www.theoutlookmagazine.com/cat/cover_story/" title="封面故事">COVERSTORY</a></li> | |
<li class=""><a href="http://www.theoutlookmagazine.com/cat/feature/" title="专题">FEATURE</a></li> | |
<li class=""><a href="http://www.theoutlookmagazine.com/cat/architecture/" title="建筑">ARCHITECTURE</a></li> | |
<li class=""><a href="http://www.theoutlookmagazine.com/cat/fashion/" title="时尚">FASHION</a></li> | |
<li class=""><a href="http://www.theoutlookmagazine.com/cat/lifestyle/" title="生活方式">LIFESTYLE</a></li> | |
<li class=""><a href="http://www.theoutlookmagazine.com/cat/art_culture/" title="艺术&文化">ART&CULTURE</a></li> | |
</ul> | |
</li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/blog/" title="博客">BLOG</a><!--<ul>博客</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/video/" title="视频">VIDEO</a><!--<ul>视频</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/gallery/" title="画廊">GALLERY</a><!--<ul>画廊</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/events/" title="活动">EVENTS</a><!--<ul>活动</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/creative/" title="创意百人">CREATIVE-100</a><!--<ul>创意百人</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/cat/shop/" title="商店">SHOP</a><!--<ul>商店</ul>--></li> | |
<li class="top "><a href="http://www.douban.com/group/174245/" target="_blank" title="论坛">BBS</a><!--<ul>论坛</ul>--></li> | |
<li class="top "><a href="http://www.theoutlookmagazine.com/links" title="链接"> LINKS </a><!--<ul>关于我们</ul>--></li> | |
</ul> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment