Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to fade in validation errors

    ]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

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    I’d guess you should use the invalidHandler callback option as described on http://docs.jquery.com/Plugins/Valid...lidate#options to set a fade on the error container.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •