||Struts 1.x 2.x | Spring | Strips | Wicket | Tapestry | Seam | JSF | RIFE | DWR | DOJO | EXT | Jquery | Json | Prototype | Hibernate | iBatis | web 2.0 | www.siva2baba.com & shivababa@gmail.com
   
  FrameWorks Theater
  JQUERY
 
JQuery

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.

jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML.

Features

jQuery contains the following features:

  • DOM element selections
  • DOM traversal and modification, (including support for CSS 1-3 and basic XPath)
  • Events
  • CSS manipulation
  • Effects and animations
  • Ajax
  • Extensibility
  • Utilities - such as browser version and the each function.
  • JavaScript Plugins


Use

jQuery exists as a single JavaScript file, containing all the common DOM, Event, Effects, and Ajax functions. It can be included within any web page by using the following code:

<script type="text/javascript" src="path/to/jQuery.js"></script>

jQuery has two styles of interaction:

  • via the $ function, which is a factory method for the jQuery object. These functions are chainable; they each return the jQuery object
  • via $.-prefixed functions. These are functions which do not work in the jQuery object per se.

A typical workflow for manipulation of multiple DOM nodes begins with $ function being called with a CSS selector string, with results in the jQuery object referencing zero or more elements in the HTML page. This node set can be manipulated by applying instance methods to the jQuery object, or the nodes themselves can be manipulated. For example:

$("div.test").add("p.quote").addClass("blue").slideDown("slow");

…finds the union of all div tags with class attribute test and all p tags with class attribute quote, adds the class attribute blue to each matched element, and then slides them down with an animation. The $ and add functions affect the matched set, while the addClass and slideDown affect the referenced nodes.

The methods prefixed with $. are convenience methods or affect global properties and behaviour. For example:

$.each([1,2,3], function() {
document.write(this + 1);
});

…writes 234 to the document.

It is possible to perform Ajax routines using the $.ajax and associated methods to load and manipulate remote data.

$.ajax({
type: "POST",
url: "some.jsp",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});

…will request some.php with parameters name=John and location=Boston and when the request is finished successfully, the response will be alerted.


Example program --http://siva2baba.diinoweb.com
 
  Today, there have been 1 visitors (20 hits) on this page! www.siva2baba.com & shivababa@gmail.com  
 
=> Do you also want a homepage for free? Then click here! <=
||Struts 1.x 2.x | Spring | Strips | Wicket | Tapestry | Seam | JSF | RIFE | DWR | DOJO | EXT | Jquery | Json | Prototype | Hibernate | iBatis | web 2.0 | http://siva2baba.diinoweb.com/files/ and www.siva2baba.com