What is jQuery?

By: Dusty Arlia
Published on June 13, 2012
Last Updated on Saturday, July 18, 2015 at 6:13 PM
Total Updates: 5

jQuery was released in January 2006 by John Resig, the inventor. Today, it is the most popular JavaScript library in use. Part of its popularity can be attributed to the fact that jQuery is free, open source software. It is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications.

jQuery is a JavaScript library that helps simplify the JavaScript programming process. The main benefit of using the jQuery library over JavaScript alone is the ability to do equivalent tasks with less code. Something that might take hundreds of lines of JavaScript code can be done with a single line of code with jQuery.

The jQuery library is made up of functions that are cross-browser compatible and much shorter in length then its JavaScript equivalent. To make use of the jQuery library, all you have to do is reference the jQuery library file (which is a single JavaScript file) using the <script> tag. Here is an example of how you would reference a jQuery library from your webpage:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

In this example, the jQuery library is hosted by Google on their Content Delivery Network (CDN). You are also able to download the jQuery library and keep it saved locally on your web server. There are benefits to both. Deciding whether to host your jQuery library locally or remotely is not too big of an issue.

By using jQuery, you can save time and make your webpage more cross-browser compatible since the jQuery library is thoroughly tested and supported.