jQuery Definition

  Internet

jQuery Definition

jQuery is a JavaScript library that allows web developers to add extra functionality to their websites. It is open source and provided for free under the MIT license. In recent years, jQuery has become the most popular JavaScript library used in web development.

To implement jQuery, a web developer simply needs to reference the jQuery JavaScript file within the HTML of a webpage. Some websites host their own local copy of jQuery, while others simply reference the library hosted by Google or the jQuery server. For example, a webpage may load the jQuery library using the following line within the <head> section of the HTML:

<script type=”text/javascript”
src=”//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script>

Once the jQuery library is loaded, a webpage can call any jQuery function supported by the library. Common examples include modifying text, processing form data, moving elements on a page, and performing animations. jQuery can also work with Ajax code and scripting languages, such as PHP and ASP to access data from a database. Since jQuery runs on the client side (rather than the web server), it can update information on a webpage in realtime, without reloading the page. A common example is “autocomplete,” in which a search form automatically displays common searches as you type your query. In fact, this is how TechTerms.com provides search suggestions when you type in the search box.

Besides its free license, the other main reason jQuery has gained such popularity is its cross-browser compatibility. Since each browser renders HTML, CSS, and JavaScript differently, it can be difficult for a web developer to make a website appear the same across all browsers. Instead of having to write custom functions for each browser, a web developer can use a single jQuery function that will work in Chrome, Safari, Firefox, and Internet Explorer. This multi-browser support has led many developers to switch from standard JavaScript to jQuery, since it greatly simplifies the coding process.

You can read more about jQuery and download the latest library at the official jQuery website.

LEAVE A COMMENT