这是我的代码
<li class="page_item "><a href="javascript:">A</a>
<ul class="children">
<li class="page_item"><a href="">1</a></li>
<li class="page_item"><a href="">2</a></li>
</ul>
</li>
<li class="page_item "><a href="">B</a>
<ul class="children">
<li class="page_item"><a href="">1</a></li>
<li class="page_item"><a href="">2</a></li>
<li class="page_item"><a href="">3</a></li>
<li class="page_item"><a href="">4</a></li>
</ul>
</li>
<li class="page_item "><a href="">C</a>
<ul class="children">
<li class="page_item"><a href="">1</a></li>
<li class="page_item"><a href="">2</a></li>
<li class="page_item"><a href="">3</a></li>
<li class="page_item"><a href="">4</a></li>
</ul>
</li>
$('.page_item').click(function(){
$('ul.children').slideToggle();
});
ul.children{
display: none;
}
我怎么能这样,当我点击A部分时,只是为了打开A部分的孩子,当我点击B时,只显示B的。不开全节开。谢谢