-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
$("tr:eq(2)") won't work but $("tr").eq(2) does #129
Comments
That's because |
Could they be supported? Sizzle does. The same is true for jQuery, etc. |
CSSselect applies selectors right-to-left, Sizzle left-to-right. RTL There are some features that CSSselect therefore can't support, eg. |
if you can't support the jQuery api, then don't claim to support it at all. |
Cheerio supports jQuery's core API. There are some parts that won't be supported due to practical reasons (animations), the rest is added as needed. Some weird parts won't be supported, unless someone makes a convincing case for them (& pull requests help, too). |
Can't cheerio convert |
@awvalenti I've just build a module that does just that, though it doesn't hook into cheerio but you can use it along side cheerio: https://github.com/watson/cheerio-eq Currently it only fixes Let me know what you think and please open pull requests or issues if you have any suggestions/comments/bugs/feedback :) |
The problem is
:eq
,:gt
,:lt
selectors are not working. They just return empty result.The text was updated successfully, but these errors were encountered: