我的代码示例:
<section id="reports">
<div class="report">
<div class="report-expand">MORE</div> <!-- this one is clicked -->
</div>
<ul class="report-moreinfo"></ul> <!-- I want to select this one -->
<div class="report">
<div class="report-expand">MORE</div>
</div>
<ul class="report-moreinfo"></ul>
<div class="report">
<div class="report-expand">MORE</div>
</div>
<ul class="report-moreinfo"></ul>
</section>
这是我的 jQuery 的一部分:
$('.report').on('click', '.report-expand', function(e) {
// $(this) === '.report-expand'
$(this).closest('.report') // now what..?
}
如何完成遍历以正确选择我当前选择的ul.report-moreinfo
内容.report
?