How to use ajaxStart() Method in JQuery AJAX
In this article, I will explain use of ajaxStart() Method in JQuery AJAX.
JQuery AJAX ajaxStart() Method
Syntax
$(selector).ajaxStart(function())
|
Example
The following example show the use of ajaxStart() method.
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("div").ajaxStart(function () {
$(this).html("<img src='demo_wait.gif' />");
});
$("button").click(function () {
$("div").load("demo_ajax_load.asp");
});
});
</script>
</head>
<body>
<div><h2>ajaxStart() Method Example</h2></div>
<button>Click</button>
</body>
</html>
|
Output
You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here