No More jQuery
A few of the platforms we use announced that they will no longer be included jQuery, so we made the decision to remove jQuery from everything we do. It meant finding new libraries, though many of them had already pivoted away from jQuery.
document.querySelector(), there aren’t many inconsistancies with browsers (though older browser support is still a thing). There really isn’t a good reason to keep using jQuery.
The Transition - Internal Code
We had to re-write all of our code so that it doesn’t use jQuery. Overall it went well, and while it isn’t as concise as some of the jQuery was, it is more readable overall. We won’t get into the details of all the changes, but overall the process wasn’t all that difficult.
The Transition - Third Party
Almost all of our projects make use of a parallax plugin. We’ve tried a few and prefer those that are simple. We stumbled across Jarallax, and found it fit our needs perfectly and performed better than some of the old ones we used.
Another library that we use often in our projects is a lightbox. We’ve tried a few and had used Fancybox https://fancyapps.com/docs/ui/fancybox/ on a few of our projects. While we where looking for a jQuery free lightbox we found that FancyBox had just come out with a new version (not fully released when we discovered it), which was perfect at that time and has since improved and expanded to include a carousel and other features.
We rarely use carousels, but they do come up occasionally. Luckily when we needed one, we found that Fancybox had got that working well.
Should you ditch jQuery
Should you get rid of jQuery? It depends. If you have a large codebase written with jQuery, it might be a bit more difficult and might not make financial sense. Also, if you have dependancies on libraries that require jQuery and you can’t find an alternative, than you might not have a choice but to keep jQuery.
If you are writing new code, are re-writing existing code and don’t have any third-party dependancies on jQuery, then get rid of it.