I'm displaying a message (#final_msg) after the user submits the form. What I want to do is that, after 15 seconds, the message (#final_msg) should fade out, clearing away [or fading out] the text in the input elements as well. Is it possible to do this?
else {
//create post data
var postData = {
"name" : $("#name").val(),
"email" : $("#email").val(),
"msg" : $("#msg").val(),
"origin" : $("#origin").val()
};
//make the call
$.ajax({
type: "POST",
url: "test.php",
data: postData, //send it along with your call
success: function(response){
$('#final_msg').fadeIn();
}
});
}