Vanilla JavaScript for building powerful web applications
jQuery is one of the great libraries that helped us overcome JavaScript browser issues when IE 6 and 7 were still around. Today, it may be a good choice to drop jQuery and its cousins, because modern browsers are pretty easy to deal with on their own. Using plain JavaScript will make your applications load and react blazingly fast.
Why choosing plain JS over jQuery?
Writing common and rather simple JavaScript functions for a website can nowadays be easily done in plain JS. There's no real gain from jQuery, although syntax is typically slightly shorter. However, that comes with the price of downloading and parsing a huge library. Yet, when writing complex JavaScript tools, such as image editors or charting libraries, both the dependency upon and the lower speed of jQuery are real drawbacks. Therefore, such code is mostly written in pure JavaScript. Again, no need for jQuery.
function plainJS() { /* This site is driven by vanilla JavaScript only */ console.log("Code base: 19 kB, minified and not gzipped"); alert("Using jQuery for the same functionality: 131 kB!"); }
Dive into vanilla JavaScript
Browse the functions list to find plain JavaScript solutions for common jQuery tasks. Get started by reading up on querySelectorAll() - a CSS selector method like the one provided by jQuery. Discover a wide variety of vanilla JS tools in the plugins repository, e.g. lightboxes, WYSIWYG editors, charting libraries, and a lot more.
Cross browser compatibility
All functions work properly in IE 9 and above - most of them are compatible with IE 8. Common pitfalls are mentioned alongside concerned functions. Available plugins have no dependencies and are tested in IE 9+, some work properly in IE 8 and below.