Re:I loved jQuery, and still do (2019)
by FinalBriefing on Tuesday June 29, 2021 @02:39PM
(#27679967)
> little bit of a facelift
Proceeds to download 30kb (compressed) swiss army knife of a library when just a toothpick would do.
jQuery is about as much of a gateway to ES6 as pot is to heroin. Devs who still use jQuery have had 10+ years to learn `document/element.querySelectorAll()`. Longer for event listeners.
When you learnt something with better more easily readable syntax, it's kinda hard to make yourself use something worse to save 30kb, when that saving will be lost with a single image on the page you're loading...
Re:I loved jQuery, and still do (2019)
by edflsafoiewq on Wednesday June 30, 2021 @03:45AM
(#27686026)
Incidentally, there's a few lightweight jQuery-likes you can use if you just want a nicer syntax. Zepto and umbrella are popular.
Gosh. 30kb.
> Devs who still use jQuery have had 10+ years to learn
Or possibly we learned it in 9 years 11 months ago and still think jQuery was a more elegant solution.
The modern web is a soup of React, Vue and Angular packages with numerous dependencies. Couldn't they just use jQuery UI?
> Proceeds to download 30kb (compressed) swiss army knife of a library when just a toothpick would do.
I agree that 30kb can be big, especially since it's JS that needs to be executed, but on the other hand if the toothpick means you save a minute, you can use it to optimize an image and end up with a lighter and faster website.
Not every site out there is an database-driven SPA that needs QA review and a deployment pipeline each time an update is made. Lots of sites are just simple WordPress or even raw HTML pages that need a little bit of a facelift, with animations or transition. jQuery does the trick, and as a bonus, it's a much gateway drug to JS than the official ES6 documentation could ever be.