我想弄清楚一兩件事,我有一個頁面的網站,想隱藏下的投資組合子菜單時其他菜單鏈接cliked http://jsfiddle.net/kuuwj/15/如何隱藏子菜單時其他菜單點擊JQuery的
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();
});
});
非常感謝您!這正是我想要的 – Vor