selectors-api

:nth-of-type() in jQuery / Sizzle?

It surprised me that Sizzle (the selector engine jQuery uses) comes with a built-in :nth-child() selector, but lacks an :nth-of-type() selector. To illustrate the difference between :nth-child() and :nth-of-type() and to illustrate the problem, consider the following HTML document: <!doctype html> <html> <head> <meta charset="utf-8"...

selectors-api for data attributes

In HTML5, CSS selectors seem to operate well with data-* attributes. For example: <style> div[data-foo='bar'] { background:#eee; } </style> <div data-foo='bar'>colored</div> <div>not colored</div> will properly style the first . But, attempts to select such elements using the selectors-api fail. Examples: var foos = document.queryS...