Thank you, jQuery

Jeremy recently updated HuffDuffer to a progressive web app and as part of that process stripped out jQuery. The great thought is that jQuery purpose is to eventually cease to exist.

After that, I decided to refactor the JavaScript too. There, I had a clear goal: could I remove the dependency on jQuery?

It turned out to be pretty straightforward. I was able to bring my total JavaScript file size down to 3K (gzipped). Pretty much everything I was doing in jQuery could be just as easily accomplished with DOM methods like addEventListener and querySelectorAll , and objects like XMLHttpRequest and classList.

An excerpt from Thank you, jQuery

View original article

Subscribe to our Newsletter

Add your email address and receive an email every Friday covering off everything worth knowing about building your websites responsively.