4 ms·
Vanilla JavaScript is what you need today. You can use document.querySelector, Array.prototype.map, fetch, and all browsers have the same behaviour so no need f
by speedgoose 6y ago
Vanilla JavaScript is what you need today. You can use document.querySelector, Array.prototype.map, fetch, and all browsers have the same behaviour so no need for any library like jQuery anymore.
- mekster 6y agoFeature parity isn't exactly the reason to drop it.... $ is easier to type than document.querySelector and it absorbs browser differences.
- nicbou 6y agoYou don't download an entire library to save you some keystrokes. Just create your own $ alias if you must.
- mekster 6y agoIt's not just $... And why not just install jQuery? What's the big deal? Where can I find the short aliased library? (If it's not there, I guess it's not a popular idea.)
- nicbou 6y agojQuery does not really add value in 2020, since browsers (even the ones that are widely phased out) have standardised all of its main features. In the last 5+ years, I have never found myself missing something from jQuery. Is there something that jQuery does marginally better than vanilla JS in 2020? > What's the big deal? Sending unnecessary dependencies over the wire without any justification
- ev1 6y ago$ is mapped to querySelector and $$ to querySelectorAll in just about every browser, isn't it? $("#something").innerHTML = "Hi"; is vanilla JS.