如果我有:
<div class='week-4 data'></div>
<div class='week-4 data'></div>
<div class='week-4 data'></div>
<div class='week-4 chart'></div>
<div class='week-5 data'></div>
<div class='week-5 data'></div>
<div class='week-5 data'></div>
<div class='week-5 chart'></div>
如何获得给定周的chart
元素? <div class='week-4 chart'></div>
我试过了:
$(".week-4:has(.chart)")
$(".week-4").has(".chart")