It will be executed whenever an Ajax request completed successfully..
// It will bind when an AJAX request completes successfully:
$(document).ajaxSuccess(function() {
$( “.log” ).text( “Triggered ajaxSuccess handler.” );
});
jQuery is a JavaScript library. It is fast, small, and feature-rich library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript. For more details visit http://jquery.com/
It will be executed whenever an Ajax request completed successfully..
// It will bind when an AJAX request completes successfully:
$(document).ajaxSuccess(function() {
$( “.log” ).text( “Triggered ajaxSuccess handler.” );
});
It helps to selects all elements.
// To hide all elements , When click a button
$(“button”).click(function(){
$(“*“).hide();
});
It helps add a custom animation of a set of CSS properties.
// it moves an element “div_id” to the right, until it has reached a left property of 450px:
$(“button”).click(function(){
$(“#div_id”).animate({left:’450px’});
});
It helps to select any element that is currently animated:.
// To change color of the animated element.
$(“.button”).click(function(){
$(“:animated”).css(“background-color”,”yellow”);
});
It helps to insert content, specified by the parameter, to the end of each element in the set of matched elements.
// To add contents and elements at once.
$( “.content” ).append( “<p>Test</p>” );
It helps to Insert every element in the set of matched elements to the end of the target.
// We can create content and insert it into several elements at once.
$(“<p>Test</p>”).appendTo( “.content” );
It helps to get the value of an attribute for the first element in the set of matched elements.
// To set the width attribute of an image to 400.
$(“button”).click(function(){
$(“img”).attr(“width”,”400″);
});
It helps to insert content, specified by the parameter, before each element in the set of matched elements..
// To create content and insert it before several elements at once.
$( “.footer” ).before( “
Copyright….
” );
It helps to attach one or more event handlers for selected elements, and specifies a function to run when the event occurs.
// To add a click event to the < p> element:.
$(“p”).bind(“click”,function(){
alert(“The paragraph was clicked.”);
});
It helps to add an event occurs, when an element loses focus.
// To add an alert, when the < input> field loses focus.
$(“input”).blur(function(){
alert(“Handler for .blur() called.This input field has lost its focus.”);
});