In jQuery, what are some of the key differences between using :eq() and :nth-child() to select any elements ?
Also in general, for the starting index, in which case does it start from “0” and when it starts from “1” ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
:eq()
:nth-child()
Further discussion of this unusual usage can be found in the W3C CSS specification.
Detailed Comparision
See the Demo: http://jsfiddle.net/rathoreahsan/sXHtB/ — Link updated
Also See the references
http://api.jquery.com/eq-selector/
http://api.jquery.com/nth-child-selector/