我的HTML代碼如下所示內...查找元素的父母一定DIV
<div class="container">
<div id="tropical">
<div class="info">
<div class="desc">
<p>Lorem ipsum.......</p>
</div>
<div class="list_of_fruits">
<ul class="list">
<li class="fruit">Avocado</li>
<li class="fruit">Banana</li>
<li class="fruit">Watermelon</li>
</ul>
</div>
</div>
</div>
<div id="sub_tropical">
<div class="info">
<div class="desc">
<p>Lorem ipsum.......</p>
</div>
<div class="list_of_fruits">
<ul class="list">
<li class="fruit">Apple</li>
<li class="fruit">Blackberry</li>
</ul>
</div>
</div>
</div>
</div>
我想獲得的li
所有父的div類「果」是內div
用的ID =熱帶...
我做了這麼多那麼遠,
$(".fruit").parents().filter("div");
但格內的ID選擇的<li>
父母= sub_tropical