jQuery Tutorial


jQuery Example


jQuery References


jQuery Ajax ajaxStart() Event Reference


  jQuery Ajax Method References


Uses

jQuery ajaxStart() method add to the function, when AJAX request begin than execute.


Syntax

$[selector].ajaxStart([callback])

jQuery Ajax ajaxStart() Method support following parameter.

Parameter Description
callback Callback is optional parameter. It is use to represents a function to be executed whenever effect is completed.
External File Create
(ajaxfile.html)
Write Down following code in ajaxfile.html file.
<html>
<body>
<p>Ajax is use to jQuery to open URL 
documents with in the documents</p>
<br />
<p>AJAX = Asynchronous JavaScript a
nd XML</p>
</body>
</html>

jQuery Ajax ajaxStart() method Example

<script type="text/javascript"> 
$(document).ready(function(){
var count= 0;
	$("button").click(function(event){
    	$("#msg1").load('ajaxfile.txt');	
		});
    $("button").ajaxStart(function(){
		count++;
        $("#msg2").text("Start Count :  " + count );
    	});	
	$("button").ajaxComplete(function(){
    	count++;		
        $("#msg3").text("Complete Count:  " + count );
    	});			
  });
<script>
Online Try This Code Your Self....   »

  jQuery Ajax Method References