這是我的HTML代碼默認後點擊子菜單顯示隱藏使用jQuery的子菜單,隱藏
<ul class="list">
<li class="pagenav">
<a title="Government" href="#">Government</a>
<ul>
<li class="page_item page-item-14"><a href="#">Code of Ordinances</a></li>
<li class="page_item page-item-5267"><a href="#">Finance</a>
<ul class="children">
<li class="page_item page-item-16"><a href="#">Fiscal Year</a></li>
<li class="page_item page-item-5280"><a href="#">Comprehensive</a></li>
</ul>
</li>
<li class="page_item page-item-5267"><a href="#">Finance year</a>
<ul class="children">
<li class="page_item page-item-16"><a href="#">Year</a></li>
<li class="page_item page-item-5280"><a href="#">Comprehensive year</a></li>
</ul>
</li>
</ul>
</li>
</ul>
默認顯示這樣的
Government
Code of Ordinances
Finance
Finance year
後點擊財經節目like that
Government
Code of Ordinances
Finance
Fiscal Year
Comprehensive
Finance year
i意思是說,我想用默認值,然後單擊財政與金融一年時間子菜單顯示&隱藏
謝謝,該代碼爲我工作 –