我一直在尝试创建一个垂直菜单,每次按下主列表项时,都会显示/隐藏子项(嵌套在另一个有序列表中)。我遇到了两个问题:
JSFiddle:http://jsfiddle.net/chg9w/225/
<ol class="main_menu">
<li class="main_item">
<a href="#">Profile</a>
</li>
<ol>
<li class="sub_item"><a href="#">details</a></li>
<li class="sub_item"><a href="#">uploaded CV</a></li>
</ol>
<li class="main_item_last"><a href="#">Applied Jobs</a></li>
<ol>
<li class="sub_item"><a href="#">In-progress</a></li>
<li class="sub_item"><a href="#">Completed</a></li>
</ol>
</ol>