3 ms·
https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector https://developer.mozilla.org/en-US/docs/Web/API/Document/qu... Does the same as the $
by cptrp2101 5y ago
https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector https://developer.mozilla.org/en-US/docs/Web/API/Document/qu...
Does the same as the $ query but native in every browser in IE9+ and gives you a native node. Also more performant than getElementBy<whatever> methods.
- Turing_Machine 5y agodocument.querySelector(selector) is more typing and more visual clutter on the editor screen. jQuery is elegant, concise, and was designed by a genius. The "modern" methods are ugly, verbose, and were designed by a committee.