我需要在页面加载后立即隐藏“二和三”类,并且能够再次单击菜单以将其向下滑动,我遇到了以下代码的问题:
$(document).ready(function()
{
$('.two, .three').slideUp('slow');
$('.active_wrapper').click(function(){
$('.two, .three').slideDown('slow');
});
});
HTML
<div class="nav_wrapper">
<div class="active_wrapper one"><a class="active" href="">home</a></div>
<div class="two"><a href="about.html">about</a></div>
<div class="three"><a href="project.html">project</a></div>
</div>