无论我点击什么,我都会得到一个折叠的菜单。顶层工作正常,它可以正确折叠和打开。但是子菜单根本不起作用。我不确定处理这个问题的正确方法是什么。任何人都可以帮忙吗?
jQuery
$(function() {
$( "#sectionContainer, .sectionContent" ).accordion({
header: ".section > a",
collapsible: true,
active: false,
});
});
HTML:
<div id="sectionContainer">
<div class="section">
<a href="#"><div class="tab active">
<span class="chevron"><img src="images/up.png" /></span><h3>Section 1</h3>
</div></a> <!-- tab -->
<ul class="sectionContent">
<div class="section"><a href="#"><li class="status complete"><h4>Introduction</h4></li></a>
<ul class="sublist">
<a href="#"><li class="status"><h6>Sub-subsection 1</h6></li></a>
<a href="#"><li class="status"><h6>Sub-subsection 2</h6></li></a>
</ul> <!-- Sub-subsections -->
</div> <!-- subsection -->
<div class="section"><a href="#"><li class="status active arrow"><h5>Subsection 1</h5></li></a>
<ul class="sublist">
<a href="#"><li class="status"><h6>Sub-subsection 1</h6></li></a>
<a href="#"><li class="status"><h6>Sub-subsection 2</h6></li></a>
</ul> <!-- Sub-subsections -->
</div> <!-- subsection -->
<div class="section"><a href="#"><li class="status"><h5>Subsection 3</h5></li></a>
<ul class="sublist">
<a href="#"><li class="status"><h6>Sub-subsection 1</h6></li></a>
<a href="#"><li class="status"><h6>Sub-subsection 2</h6></li></a>
</ul> <!-- Sub-subsections -->
</div> <!-- subsection -->
<div class="section"><a href="#"><li class="status"><h5>Review</h5></li></a>
<ul class="sublist">
<a href="#"><li class="status"><h6>Sub-subsection 1</h6></li></a>
<a href="#"><li class="status"><h6>Sub-subsection 2</h6></li></a>
</ul> <!-- Sub-subsections -->
</div> <!-- subsection -->
</ul> <!-- sectionContent -->
</div> <!-- section1 -->
</div> <!-- sectionContainer -->