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 Coder
    Join Date
    Jun 2011
    Posts
    49
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Adding class to label error

    Hi,

    I have a <label> error displaying using the Validator plugin, however I wish to add another class to it when the validator displays the <label>, how is this possible in jQuery?

    Thanks.
    Last edited by Kor; 11-24-2011 at 12:47 PM. Reason: set the Prefix to JQuery

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,785
    Thanks
    8
    Thanked 131 Times in 129 Posts
    Since you didn't specify, I'm going to guess you are using this plugin: http://bassistance.de/jquery-plugins...in-validation/

    If so, look in the JS and find this line:

    Code:
    errorClass: "error",
    make it something like this:

    Code:
    errorClass: "error yourAdditionalErrorClass",
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis


  •  

    Posting Permissions

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