button loading animation on click using jquery

$ (document).ready (function () { $ ("span.click").click (function () { var io = this.io ^= 1; // Simple I/O toggler $ (".map").animate ( {"opacity": io ? success:function(data){ //remove gif 2. 1 : 0}, 200); $ (".navigation").animate ( {"bottom": $(this).attr("label", $(this).text()).text("loading .").animate({ disabled: true }, 1000, function () { 2. The best loading and blocking that particular div for ajax call until it succeeded is Blockui go through this link http://www.malsup.com/jquery/bl Add references to jQuery library and the GoButton plugin's files: 1. Hello & welcome everyone, Today this is a Jquery tutorial in which you will learn about how you can create 3 steped button loading aniamtion on click that you will see in this $.ajax({ The element receives a click event. $("#btnId").click(function(e){ try $("#btnId").click(function(e){ //show lo . e.preventDefault(); If you are using ajax then (making it as simple as possible) Add your loading gif image to html and make it hidden (using style in html itself now,