我想弄清楚一件事,我有一个单页网站,当其他菜单链接点击http://jsfiddle.net/kuuwj/15/时,我想隐藏投资组合下的子菜单
HTML
<ul id="navbar">
<li><a href="#home" id="nav-home">Home</a></li>
<li><a href="#portfolio" id="nav-portfolio">Portfolio</a>
<div class="portfolio-apps">
<section id="website">
<span class="button">AAAAAAAAAAAAAAAAAAAAAA</span>
</section>
<section id="gterminal">
<span class="button">BBBBBBBBBBBBBBBBBBBBBB</span>
</section>
<section>
<span class="button">CCCCCCCCCCCCCCCCCCCCCC</span>
</section>
</div>
</li>
<li><a href="#about" id="nav-about">About Me</a></li>
<li><a href="#contact" id="nav-contact">Contact</a></li>
</ul>
JS
$(document).ready(function () {
var portf_apps = $('.portfolio-apps');
portf_apps.hide();
$('#nav-portfolio').click(function() {
portf_apps.show();
});
});