Why do we use jQuery?

It's a common question these days: "why use jQuery"?

Reasons given to avoid it are:

As far as file-size goes, I think the lack of modularity could be a real issue. If we were building a fast-as-lightning mobile app, I'd break it into parts. Or use something else. Ender, for example.

But for a reasonably-sized website, here's what we really want:

Ok cool, so jQuery is actually giving us a lot of stuff, and we can just build on top of it where we need to. I DON'T find that jQuery is providing lots of things that we're not using. Also, jQuery isn't dictating how we work with our own code - it just provides a toolset for DOM manipulation. That gives us a lot of flexibility to find our own style.

On top of this, at Twitter we add:

Here's a few things we WISH we had:

jQuery's plugins and UI components are the parts I avoid, but are also the parts we can build ourselves. I envy the DOJO UI, because as a user I find the controls to be useful and reliable, but i always find it very hard to work with them. Their API is awful. I'd love to see a full port to jQuery.

Ultimately, jQuery is actually a useful tool. Long may it continue to be so.

Thanks for reading! I guess you could now share this post on TikTok or something. That'd be cool.
Or if you had any comments, you could find me on Threads.

Published