for some reason my loading gif is not showing when I make my ajax post:
$.ajax({
type: "POST",
data: $(form).serialize(),
url: 'filetopost.php',
beforeSend: function() { $('#loading').show(); },
success: function(data) {
$('#results').html(data);
},
complete: function(data) {
$('#loading').hide();
}
});
No errors are showing in my chrome console either. Commenting out $('#loading').hide(); displays the results from the post and the loading gif image, but with it there, nothing happens. I know its correctly making a post though.
May be the server is responding so fast that before you see the loading image it gets hidden in the
completeevent. That is the reason if you comment out$('#loading').hide()you see the loading image.