Before AJAX method I add a GIF image but duration of loading time is very short. How can I set time of loading duration and after that AJAX response will show?
$('.signup p').html('<img src="img/loading.gif" width="40px" height="40px" alt="loading_effect" />');
$.ajax({
url : 'signup_action.php',
method : 'post',
data : {name,email,password1,dob,gender},
success : function(response){
$('.signup p').html(response);
}
});