...

View Full Version : jQuery How to fade in validation errors



duggieuk
02-01-2011, 05:21 PM
]Hi
I'm using the following code to show validation errors on a form. It works fine but i would like the errors(which are within a hidden div) to fade in. Anyone know how to do this. Also if the user enters all the information correctly is it possible to show up a thank you message in place of the error message. Thanks for all your help.

[CODE]
$(function() {
$("#form").validate({
errorContainer: "#error",
errorLabelContainer: ".error_list",
wrapper: "li",

rules: {
name: {
required: true,
minlength: 2
},

email: {
required: true,
email: true
},

message: {
required: true,
minlength: 2
},
}
});
});
[/CODE

VIPStephan
02-01-2011, 06:04 PM
I’d guess you should use the invalidHandler callback option as described on http://docs.jquery.com/Plugins/Validation/validate#options to set a fade on the error container.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum