I was checking out HTML5 new javascript commands and there is something similar to:
var els = document.querySelectorAll("ul li:nth-child(odd)");
This allows you to find all elements by css syntax.
But I sure Jquery also has something a little similar to this.
The question is, as browsers are getting better javascript APIs…
- JQuery will not exist in future? Is it safe to keep JQuery in our websites for the next years?
jQuery does a lot more than just the selector engine (Sizzle), and Sizzle uses
querySelectorAll()if it’s available since the version included with jQuery 1.4.3.No, it’s not going anywhere, the selectors are only one piece of the puzzle.