Animate the Message Response with jQuery Form Plugin
I have a
form that submits a message to the server and the server echos it back in an HTML div in which response is added to the page in the .message div. I can make the .message div basically jump into place with
- $(function() {
$('#myForm').ajaxForm({
target: '.message',
success: function() {
$('.message').slideDown('5000');
}
});
});
however I would like this message to just slide gracefully into view. Using slideDown, show(slow) and fadeIn do not see to work as expected it still just jumps into view. So I went with animate which works somewhat but only at the end of the width using the following code:
- $(function() {
$('#myForm').ajaxForm({
- target: '.message',
success: function() {
$('.message').hide();
$('.message').animate({opacity:100,width:'88%',height:'100%'},3000);
}
});
});
How can I get the response to gracefully show up and gracefully go away when the person clicks to return to the form?