Wednesday, 14 August 2013

ajax post fade in after success

ajax post fade in after success

Probably a simple question, but I have been trying to get this to work for
a few hours now. I tried almost everything I found about this on
stackoverflow, but nothing seems to work. Maybe a pair of fresh eyes can
tell me how to do this.
I want to fade in a div after calling this javascript function.
function getRequest(){
$.ajax({
type : "POST",
url : "/includes/requests.php",
data : "mode=get_requests",
success : function(result) { $("#requests").html(result);
$('#requests').fadeIn(9000);
}
});
}
EDIT: Thanks everyone. This
$('#requests').hide().fadeIn(9000);
did it.

No comments:

Post a Comment