Top 8 Reasons Why jQuery is so Popular

logo_jquery_215x53

 

You’ve read that jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery makes it easy to play with the DOM, add effects, and execute Ajax requests, but what makes it better than writing your own library, or using one of the other (also excellent) JavaScript libraries out there?  Here are the top 8 reasons that I think make jQuery so successful:

Cross-browser Compatibility    image

One of the biggest challenges in Ajax/JavaScript programming is cross-browser inconsistencies – it will drive you mad. For example, a design that renders perfectly in Internet Explorer 8 but may not run that well in Mozilla Firefox, or an interface component you’ve spent days handcrafting works beautifully in all major browsers except Opera on Linux.  The jQuery team is aware of the cross-browser issues, and more importantly they understand why these issues occur. They have written this knowledge into the library—so jQuery works around the caveats for you. Most of the code you write will run exactly the same on all the major browsers.

Fast & Small Footprint

A lot of fairly common functionality has been omitted from the jQuery core library, and relegated to the realm of the plugin.  Any additional required functionality can be included easily on a page-by-page basis to keep bandwidth and code bloat to a minimum. The jQuery core library is only about 24KB in size (Minified and Gzipped) so it is very easily to include in your application and very fast as well.

Short Learning curve & Great Documentation

The learning curve is short as you probably can start writing some jQuery code after a 30 minutes quick tutorial study.  jQuery is also very well documented.  You can find all the jQuery documentation at https://docs.jquery.com

Tons of Plugins

By including only a core set of features while providing a framework for extending the library, jQuery team made it easy to create plugins that you can reuse in all your jQuery projects, as well as share with other developers. A lot of people have taken advantage of jQuery’s extensibility, so there are already hundreds of excellent, downloadable plugins available from the jQuery plugin repository, with new ones added all the time.

image

CSS3 Selectors Compliant

jQuery fully supports the CSS3 selector specification.  You can gain a head start on the future by learning and using CSS3 selectors right now in your production code.

 

Helpful Utilities

jQuery also provides the utility functions that implement common functions useful for writing jQuery :string trimming, the ability to easily extend objects, iteration, array manipulation and more. These functions by themselves are particularly handy, and they help promote a seamless integration between jQuery and JavaScript which results in code that’s easier to write and maintain.
One noteworthy utility is the supportsfunction, which tests to find certain features are available on the current user’s browser. Using the jQuery supports utility function, you can test to see if a certain feature is available to the user, and easily build applications that degrade gracefully on older browsers, or those not standards-compliant.

jQuery UI

jQuery User Interface (jQuery UI ) separates out higher-level constructs and is packaged into a neat library that sits on top of jQuery. Accordions, sliders, dialog boxes, date pickers, and more—all ready to be used right now! You could spend a bunch of time creating them yourself in jQuery but the jQuery UI controls are configurable and sophisticated enough that your time would be better spent elsewhere.

image

Widespread Adoption

Countless big players on the Web are jumping on the jQuery bandwagon: IBM, Netflix, Google (which both uses and hosts the jQuery library), and Microsoft, which now includes jQuery with its MVC framework and works with the open-source jQuery project to contribute new features to the jQuery library. With such a vast range of large companies on side, it’s a safe bet that jQuery will be around for some time to come—so the time and effort you invest in learning it will be well worth your while! jQuery’s popularity has also spawned a large and generous community that’s surprisingly helpful.