I am having a problem using the jquery Form Plugin. I have a form that is setup that I would like to animate the errors/success when a user submits incorrect information or gives the user a succes message when then enter correct information.
I would like the different messages to slide into view when being displayed but right now they just pop into view. How do I make it animate or rather slide into view? The page is question is
http://capnhud.host22.com/sampleform2.html
The code I am using is:
Code:
$(function() {
// bind form using ajaxForm
$('#myForm').ajaxForm({
// target identifies the element(s) to update with the server response
target: '.message',
// success identifies the function to invoke when the server response
// has been received; here we apply a fade-in effect to the new content
success: function() {
$('.message').slideDown('slow');
}
error: function() {
$('.message').slideDown('slow');
}
});
});
$.fn.clearForm = function() {
return this.each(function() {
var type = this.type, tag = this.tagName.toLowerCase();
if (tag == 'form')
return $(':input',this).clearForm();
if (type == 'text' || type == 'password' || tag == 'textarea')
this.value = '';
else if (type == 'checkbox' || type == 'radio')
this.checked = false;
else if (tag == 'select')
this.selectedIndex = -1;
});
};
But no matter what this does not slideinto view it just pops