-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:nth-child() selector returns empty result #143
Comments
did you resolve the issue? |
Yep. it was on my side. sorry for that. |
piffie, how did you solve that? |
Just solved it myself: the correct is $('.classSelector div:nth-child(n)') and not $('.classSelector:nth-child(n)') |
@Hamdan85 I don't think that is corrent. https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child Gives an example of Note that it is using Did you mix this up, or is it a bug in cheerio? |
oh.. im sorry... that was a misstyping. you are absolutely correct.!] But this particular part was not the point. I just corrected the solution. |
I had a similar problem:
did not work (although it matches the html markup)
My theory: chrome's fault. So my advice, make sure all elements are present in the actual html :) |
Firefox also seems to like insert a |
i know that :eq() is not implemented,
but nth-child is. (https://github.com/fb55/CSSselect/blob/master/index.js#L179)
anyways, always returns an empty result set.
The text was updated successfully, but these errors were encountered: