【发布时间】:2011-11-07 04:13:03
【问题描述】:
以下面的html为例:
<h1>Level 1 Header</h1>
<h1>My Second Level 1 Header</h1>
<h1>And a third for kicks</h1>
<h2>Level 2 Header</h2>
<h2>2nd Level 2 Header</h2>
<p>Here is a paragraph.</p>
<p>Here is a paragraph number 2.</p>
<p>And paragraph number 3.</p>
<ul>
<li>list item 1<li>
<li>list item 2<li>
<li>list item 3<li>
<li>list item 4<li>
</ul>
如何只选择每个元素的第一个实例?
我希望隐藏所有元素,每个元素的“第一个”除外。
提前致谢!
【问题讨论】:
标签: javascript jquery filter