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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…