<div id="test">
<span>Don't select me</span>
<span>Select me</span>
</div>
I want to select second span in div#test.
Exist eq() selector (like jQuery) or something like that?
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.
Unfortunately
Zend_Dom_Querydoesn’t support the:nth-child(n)selector from css, but reverting back toxpathto query you could write:The
Zend_Dom_Querylibrary uses xpath behind a scenes to execute CSS style queries so, if you got struck with xpath syntax, you can take a sneak peek into what’s it generated with thegetXpathQuerymethod on the result objects.