[jQuery] Please help me to find my mistakes on below code
Hi,
I am trying to solve ajaxStart and ajaxStop issue from last 3 days but
can not solve...can somebody tell me what's my mistake here.
I want to show a loader image for different DOM element ids on
different ajax request. Problem is that when I am calling an ajax
request on one form submission then not only it's corresponding but
also other loader image is showing, while only one loader image must
be show.
Here is my code:
First Block code
-----------------------------------------------------------------------------------------------------------------
<script>
$(document).ready(function(){
$("form#submit").submit(function() {
$.ajax({
type: "POST",
url: "test1.php",
success: function(del){
$('div.success').fadeIn();
}
});
jQuery('#id_fav_loading').ajaxStart(function() {
jQuery('#id_fav_loading').show();
}).ajaxStop (function() {
jQuery('#id_fav_loading').hide();;
});
return false;
});
});
</script>
<div class="container">
<form id="submit" method="post">
<label for="lname">Client Last Name:</label>
<input id="lname" class="text" name="lname" size="20" type="text" /