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. However my problem is twofold. The message that displays on the same page only works in firefox with the jquery that I currently using. What would cause this?
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 in question is here
$(document).ready(function() {
var options = {
target: '#alert',
};
$('#myForm').ajaxForm(options);
});
$.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;
});
};
/*this is my addition to getting the slide into view, but does not work */
$('#alert').onsubmit(function() {
// This will be called before the form is submitted
$('.message').show().animate("slow");
});
/*$(function() {
$('.message').('slow').show('slow');
$('.message').('slow').show('slow').animate({opacit:1.0}, 4000).hide('slow');
$('input').clearForm()
}); */