jQuery Introduction

JQuery is a type of  JavaScript library that emphasizes interaction between JavaScript and HTML. It provides easier access to the DOM model and it also simplifies the creation of animations, communicating with server, document traversing and event handling. Another striking feature of JQuery is the ability to implement AJAX functionality.

You can download JQuery library from JQuery.com. This library has JQuery function that can be embedded with scripts.

EMBEDDING JQUERY LIBRARY IN YOUR SCRIPT:

<script type=”text/javascript” src=”jquery.min.js” />

(or)

If JQuery library is not downloaded and still you want to use in your application then include the following statement

<head>
<script type=”text/javascript”  src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>
</head>

(or)

<script type=”text/javascript”  src=”http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js” />

EXAMPLE:

<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
alert("LEARN WEB DEVELOPMENT");
});
</script>
</head>

ADVANTAGES:

  • Ease of use
  • Large library
  • Strong opensource community(Several jQuery plugins available)
  • Ajax support

DISADVANTAGES:

  • JQuery library required
  • JQuery functionality can be limited



Posted in jQuery Tagged with: ,