I want to know in below case will the browser stop traversing the DOM after getting the first .myclass
$(".myclass").eq(0)
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.
I don’t believe so.
Will return a jQuery object that (behind the scenes) contains an array of all matching DOM elements.
You are then calling a method on that object to return the first element.
If you want to avoid this, you need your selector to only select one element. Take a look at the documentation for selectors:
http://docs.jquery.com/Selectors
Try this instead: