2015-06-29 88 views
0

我正在使用jQuery。有必要參考類選擇器.potatoes:

$('.apple .potatoes') 

但它在選擇器類內,不應該選擇.orange。

<div class="apple"> 
    <div class="orange"> 
      <div class="potatoes" title="dont touch me">dont touch me</div> 
    </div> 
    <div class="potatoes" title="return to Me">return to Me</div> 
</div> 

回答

相關問題