logoalt Hacker News

SparkyMcUnicornyesterday at 6:56 PM3 repliesview on HN

I still think the only reason to use jQuery is if you need IE11 support.

Otherwise, it's really simple to do all the things you mentioned without the complexity/heaviness of jQuery. Something like this:

``` const $ = s => { const r = {}; const els = [...document.querySelectorAll(s)]; r.text = t => (els.forEach(e => e.textContent = t), r); r.on = (ev, fn) => (els.forEach(e => e.addEventListener(ev, fn)), r); // ... return r; }; ```


Replies

mrweaseltoday at 11:10 AM

jQuery is 30kB, there's not a lot of heaviness. In a world of React, Vue, htmx and what have you, 30kB is nothing.

If you like the syntax and functionality of jQuery, or if you're just use to it now, there's very little reason to no use it, and speed and size certainly isn't a reason. 15 years ago, maybe, but not in 2026.

petcattoday at 10:20 AM

Right, I can cobble together my own worse version of jQuery if I wanted to.

Or I can just use jQuery.

tao_oattoday at 10:24 AM

Does anyone actually need IE11 support in 2026? It was released 13 years ago.