我想弄清楚如何找到不在特定父項內的元素。下面是一個簡單的html:查找不在特定父項內的元素
<div class="id01">
<p>some text</p>
</div>
<p>some more text</p>
<p>some more more text</p>
好了,現在我需要找到一個第一款不是父#ID01內,這是我在哪裏迷路。我開始那樣做
$('p:first').text(); //this way i would get the P inside DIV but I want to skip that one and count on next one that has no parent #01
希望我清楚。
[api.jquery.com/category/selectors/ ](http://api.jquery.com/category/selectors/)。所有你需要知道的jQuery選擇器。 – adamb 2013-03-04 16:54:56
命名一個類「id01」有點令人不安。 – 2013-03-04 16:56:37
只是一個樣本,srry – devjs11 2013-03-04 16:56:57