Back in the old days, when I was building web sites by hand, in the snow, uphill, both ways, jQuery was my default tool when building any kind of interactivity on a web page. Way before I even considered building apps, jQuery was the workhorse that made cross-browser web development easy, or at least a little less painful. In 2024, it’s still in use on the vast majority of web sites. (I’ve seen various numbers, but all point to at least roughly three fourths of the web sites in use today.)
I think part of the reason jQuery was so successful is that, along with patching browser incompatibilities (looking at you, Safari & Internet Explorer), it was a laser focused set of utilities for common things developers needed to do. Mainly:
It did a lot more than that, but those three items are part of every interactive web page I’ve built since the introduction of JavaScript. This is why I’ve been so enamored of late with Alpine.js. Alpine.js is lightweight (44kb minified, around half of jQuery’s size) and simple enough that the entire thing (at a high level), is documented on the home page. Let’s quickly go over the basics, and hopefully you’ll fall in love as well!