< Jquery Tutorial

Jquery Introduction

Next →

jQuery is a fast and concise JavaScript library created by John Resig in 2006. jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for Rapid Web Development.

What is jQuery


jQuery is a fast, small, cross-platform and feature-rich JavaScript library. It is designed to simplify the client-side scripting of HTML. It makes things like HTML document traversal and manipulation, animation, event handling, and AJAX very simple with an easy-to-use API that works on a lot of different type of browsers.

The main purpose of jQuery is to provide an easy way to use JavaScript on your website to make it more interactive and attractive. It is also used to add animation.

  • jQuery is a small and lightweight JavaScript library.
  • jQuery is cross-platform.
  • jQuery means "write less do more".
  • jQuery simplifies AJAX call and DOM manipulation.

jQuery Example

File: firstjquery.html

<!DOCTYPE html>
<title>First jQuery Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
<script type="text/javascript" language="javascript">
$(document).ready(function() { $("p").css("background-color", "pink"); }); </script>
<p>This is first paragraph. <p>This is second paragraph. <p>This is third paragraph. </body>

Why jQuery is required

Sometimes, a question can arise that what is the need of jQuery or what difference it makes on bringing jQuery instead of AJAX/ JavaScript? If jQuery is the replacement of AJAX and JavaScript? For all these questions, you can state the following answers.

  • It is very fast and extensible.
  • It facilitates the users to write UI related function codes in minimum possible lines.
  • It improves the performance of an application.
  • Browser's compatible web applications can be developed.
  • It uses mostly new features of new browsers.


Next →