I would like to place a \"please wait, loading\" spinning circle animation on my site. How should I accomplish this using jQuery?
This would make the buttons disappear, then an animation of "loading" would appear in their place and finally just display a success message.
$(function(){
$('#submit').click(function(){
$('#submit').hide();
$("#form .buttons").append('');
$.post("sendmail.php",
{emailFrom: nameVal, subject: subjectVal, message: messageVal},
function(data){
jQuery("#form").slideUp("normal", function() {
$("#form").before('Success
Your email was sent.
');
});
}
);
});
});