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?
The code I've used:
- $(document).ready(function(){
- $('#my_form').validate({
- rules:{
- name:{
- required: true
- }
- },
- messages:{
- name:{
- required: "The field is mandatory !"
- }
- }
- });
- $("label.error").hide().fadeIn("slow");
- $(this).fadeIn(1000);
- });