What is jQuery

jQuery is a fast and lightweight JavaScript library developed in 2006 by John Resig with the concept of “Write less, do more”. It makes the things like HTML document traversal, animations, event handling, AJAX interactions much simpler that works seamlessly across all the major browsers. jQuery is a very popular JavaScript library and companies like Google, Microsoft and IBM are using it in their applications.

jQuery Core Features

jQuery is designed to simplify various tasks by writing less code. Here are some core features of jQuery.

DOM manipulation

It is easy to select, traverse and modifying the contents of DOM elements through jQuery.

Event handling

The jQuery offers an elegant way to capture a wide variety of events such as click, change, blur etc.

AJAX Support

The jQuery has made it simple to develop a responsive and feature-rich site using AJAX technology.

Animations

You can use plenty of jQuery’s built-in animation effects in your websites.

Lightweight

The jQuery is very lightweight library and will not hurt the performance of your applications.

Compatible with browsers

The jQuery has cross-browser support, and compatible with all major modern browsers such as Mozilla Firefox, Google Chrome, Safari, Internet Explorer, and Opera.

Latest Technology

The jQuery supports the latest technologies like CSS3 selectors and basic XPath syntax.

How to use jQuery

You can use jQuery in HTML code in following ways.

jQuery Local Installation

Download jQuery library from jQuery official site (https://jquery.com/download/) on your machine and include it’s path in your HTML code.

<html>

<head>

<title>jQuery Local Installation</title>
<script type = “text/javascript” src = “/js/jquery-2.1.3.min.js”></script>
<script type = “text/javascript”>

$(document).ready(function(){

document.write(“jQuery installed locally”);

});

</script>

</head>

<body>
</body>

</html>

jQuery CDN Based Installation

The jQuery library can be included into HTML code directly from CDN.

<html>

<head>

<title>jQuery CDN Based Installation</title>
<script type = “text/javascript”
src = “https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js”></script>

<script type = “text/javascript”>

$(document).ready(function(){

document.write(“jQuery Installed from CDN”);

});

</script>

</head>

<body>
</body>

</html>