jQuery

0
62

jQuery is a JavaScript library that allows web developers to add extra functionality to their websites. It is open-source and is provided for free under the MIT license.

In just a few years, jQuery has emerged as a very popular JavaScript library used in web development.

To implement jQuery, a web developer has to reference this jQuery JavaScript file in HTML for a webpage. Some websites host their local copy of jQuery; others simply refer to the library hosted by Google or jQuery server.

For example, a webpage can easily load the jQuery library by the following line, but it is written in the <head> section of HTML in something like this:

<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 web page can call any number of times the Query function the library supports.

Simple examples include modifying text, processing form data, moving elements on a page, and performing animations. jQuery can easily 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 (not the webserver), it can update the information in a webpage in real-time, requiring reloading the page.

A very common example is “autocomplete,” in which a search form automatically starts displaying common searches as soon as you type your query.

At the same time, its free license is another important reason why jQuery has become so popular. At the same time, its cross-browser compatibility is also a reason for its popularity.

Since each browser renders HTMLCSS, and JavaScript separately, it is very difficult for a web developer to make a website appear the same in all browsers.

So instead of writing custom functions for each browser, a web developer can use a single jQuery function that will work in all browsers such as ChromeSafariFirefox, and Internet Explorer.

This multi-browser support has attracted a lot of developers to switch from standard JavaScript to jQuery, as it simplifies the entire coding process.

LEAVE A REPLY

Please enter your comment!
Please enter your name here