News for hackers. Stuff that matters.
Re:I loved jQuery, and still do (2019) by Legion on Tuesday June 29, 2021 @03:10PM (#27680367)
> Is this supposed to be making the case ~against~ jQuery?

It's supposed to be making a case against jQuery if you're pulling in the whole library just to do this one thing.

I've always read the site as "here's how to do it in native JS, yes it's uglier, but if you only need this, you can skip pulling in another dependency."

Re:I loved jQuery, and still do (2019) by rchaud on Tuesday June 29, 2021 @04:20PM (#27681209)
We use React, Angular and Vue for websites where 99% of the functionality could be done without monstrosities like CSS-in-JS.

Over-engineering websites has been around forever. That's partially why jQuery is modular, letting you pick what you need.This covers the 'use jquery for just this one thing' crowd. And if they're lazy, well, they can hang their heads in shame because they have added an entire 83 KB to the page's initial load time. /s

(unless the browser has a CDN cache stored, in which case it wouldn't impact load time at all)

Re:I loved jQuery, and still do (2019) by mvolfik on Wednesday June 30, 2021 @08:11AM (#27687516)
note that browsers' cache has recently been changed so that it's isolated for each origin - if you visit a.com which loads jQuery, it doesn't speed up loading jQuery on b.com at all https://developer.mozilla.org/en-US/docs/Web/Privacy/State_P...