difference between :first and :first-child not clear
Posted
by sushil bharwani
on Stack Overflow
See other posts from Stack Overflow
or by sushil bharwani
Published on 2010-05-31T22:11:17Z
Indexed on
2010/05/31
22:33 UTC
Read the original article
Hit count: 280
i am having a ul li list
<ul>
<li>Parent
<ul>
<li>
child1
</li>
<li>
child2
</li>
</ul>
</li>
</ul>
and i am trying to use a selector jQuery('ul li:first')
and jQuery('ul li:first-child')
both giving the same result this makes me confused about the difference between the two is there a example which clarifies the difference between two selectors
© Stack Overflow or respective owner