add fadein to jquery validate error messages

add fadein to jquery validate error messages

How to add fadein() in the jquery validate label error messages? I've tried the following:

$("label.error").hide().fadeIn("slow");
$(this).hide().fadeIn(1000);

but neither of them work. Can anyone please help me?

Thank you.


The code I've used:
  1. $(document).ready(function(){
  2. $('#my_form').validate({
  3. rules:{ 
  4. name:{ 
  5. required: true
  6. }
  7. },
  8. messages:{
  9. name:{ 
  10. required: "The field is mandatory !"
  11. }
  12. }
  13. });
  14. $("label.error").hide().fadeIn("slow");
  15. $(this).fadeIn(1000);
  16. });