4 ms·
jQuery in three lines. Awesome. const $ = (selector) => document.querySelector(selector) const $$ = (selector) => document.querySelectorAll(selector) con
by thibautg 9y ago
jQuery in three lines. Awesome.
const $ = (selector) => document.querySelector(selector)
const $$ = (selector) => document.querySelectorAll(selector)
const on = (elem, type, listener) => elem.addEventListener(type,listener)
- Felk 9y agoconst $ = document.querySelector const $$ = document.querySelectorAll :)
- Etheryte 9y agoWhile I understand your sentiment, jQuery was never just about selecting elements in a simple manner — it took care of countless browser bugs and inconsistencies for you, which is why it became as popular as it did. Not to mention the large plugin ecosystem, which you may have loved or hated, depending on your preference.