Written by
Marek Aufart
on
on
Javascript querySelector
The most often jQuery use-cases contain some selector. jQuery uses Sizzle library. But how can it be done in plain javascript?
The cool methods are document.querySelector() and document.querySelectorAll(). Less advanced that jQuery selectors, but works default in modern browsers.
More at http://www.javascriptkit.com/dhtmltutors/css_selectors_api.shtml