New 'Slim' Build Highlights jQuery 3.0 Final Release

jQuery, the big daddy of JavaScript libraries, has been moved to version 3.0 after a 20-month development effort, featuring a new "slim" version and numerous other enhancements.

"We set out to create a slimmer, faster version of jQuery (with backwards compatibility in mind)," wrote Timmy Willison in a blog post yesterday.

jQuery is the most popular of all JavaScript libraries, according to several citations in its Wikipedia page. Known for providing easier DOM manipulation, adding effects to Web pages and simplifying Ajax data requests, the open source library's ubiquitous dollar sign ($) alias can be seen in thousands of JavaScript projects around the world. Often called a framework, its popularity almost rivals the base JavaScript language itself.

"jQuery is a fast, small, and feature-rich JavaScript library," says the site published by The jQuery Foundation. "It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript."

In the new release, "We've removed all of the old IE workarounds and taken advantage of some of the more modern Web APIs where it made sense," Willison said. "It is a continuation of the 2.x branch, but with a few breaking changes that we felt were long overdue. While the 1.12 and 2.2 branches will continue to receive critical support patches for a time, they will not get any new features or major revisions. jQuery 3.0 is the future of jQuery."

The future of jQuery is available in a new "slim" version that doesn't include modules that might not be needed in many development projects.

"Sometimes you don't need Ajax, or you prefer to use one of the many standalone libraries that focus on Ajax requests," Willison said. "And often it is simpler to use a combination of CSS and class manipulation for all your Web animations. Along with the regular version of jQuery that includes the Ajax and effects modules, we're releasing a 'slim' version that excludes these modules. All in all, it excludes Ajax, effects, and currently deprecated code. The size of jQuery is very rarely a load performance concern these days, but the slim build is about 6k gzipped bytes smaller than the regular version -- 23.6k vs 30k."

Other enhancements include: compatibility with promises standards; the elimination of silent error cases; removal of deprecated event aliases; changes in the way animations work under the hood; speedier custom selectors and many more.

Willison thanked 29 developers who contributed to the new release, for which development started in October 2014.

"To assist with upgrading, we have a brand-new 3.0 Upgrade Guide," Willison said. "And the jQuery Migrate 3.0 plug-in will help you to identify compatibility issues in your code. Your feedback on the changes will help us greatly, so please try it out on your existing code and plug-ins!"

About the Author

David Ramel is an editor and writer for Converge360.