1. 导言 我有2个男子,即“Main”和“Sub”——当你在主要环节上把一个特定环节 h倒时,我强调子菜,给它增加一个类别......great 当我把“主要利子”的颜色 off回正常......时,我需要保留这一颜色,如果我把这个颜色推到底......例如,他们都强调......。
- ...then.... once I actually hover onto the sub nav....then the highlighting would cease...and only the sub menu item link i roll onto goes the highlighted colour (This can just be the normal "a:hover" state.
So I guess in a nutshell..
主要菜单项目......次菜单项目已着重指出......从主角开始......小菜单仍然强调......(但只有从主子到子才能强调这一点),否则会放松强调)...... (标准a:子菜单的over)
Here s my code thus far, which activates the global highlighting:
<ul id="primarynav">
<li><a href="">home</a></li>
<li class="portfolio"><a href="">protfolio</a></li>
<li><a href="">contact</a></li>
</ul>
<!-- Secondary nav -->
<ul id="secondarynav">
<li><a href="">Websites</a></li>
<li><a href="">Graphics</a></li>
<li><a href="">Drawing</a></li>
</ul>
$(document).ready(function(){
var $primarynav = $( #primarynav .portfolio ),
$secondarynav = $( #secondarynav );
$primarynav.hover(function(){
$secondarynav.addClass( highlight );
}, function(){
$secondarynav.removeClass( highlight );
});
});