The one thing I really miss from jQuery is the fluent interface. $(".someclass").hide() and all of them are hidden. document.querySelectorAll(".someclass").forEach(e => e.style.display = "none") is a lot more verbose. $(".someclass").addClass("something else") translates to document.querySelectorAll(".someclass").forEach(e => {e.classList.add("something");e.classList.add("else");}) so now you either write your own mini-abstraction over DOM methods or use some framework, even if the things you want to do absolutely do not need it.
Re:What We Lost with PHP and jQuery
by someothherguyy on Sunday June 01, 2025 @01:15PM
(#44152339)
classList.add is variadic, so a more honest implementation might be
var _ = s => document.querySelectorAll(s)
_('.someclass').forEach(e => {e.classList.add('something', 'else')})Nothing touches jQuery's intuitive $.animate. Just about everything has looked absurd since then. It's not really anyone's fault, these frameworks are not as flexible as they were made out to be. Small post-mortem.
Re:What We Lost with PHP and jQuery
by someothherguyy on Sunday June 01, 2025 @01:30PM
(#44152454)
The native animation API isn't that bad, and it is somewhat informed by the jQuery API.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Animati...
Jquery isn’t going to make anything easier today. It’s definitely contemporary with this age of web development, but the expected standard library in a browser implementation of JavaScript (+css animations triggered by JavaScript) includes all of jquery’s features automatically. What you will get is more complex stack traces and a rather large dependency (large in comparison to no-dependency) that just unlocks a bespoke syntax for other JavaScript features.
Places where you used jquery, can now be just JavaScript. It’s lovely to use like that actually!
Everything else, totally agree with though!