then

.errorClass{
      background-color:red;
}

On Thu, Dec 17, 2009 at 14:27, Leonardo K <leo...@gmail.com> wrote:

> Something like this:
>
> $(".selector").validate({
>     highlight: function(element, errorClass) {
>         $(element).addClass(errorClass);
>         $(element.form).find("label[for=" + element.id +
> "]").addClass(errorClass);
>         $(element).closest('fieldset').addClass(errorClass);
>     },
>     unhighlight: function(element, errorClass) {
>         $(element).removeClass(errorClass);
>         $(element.form).find("label[for=" + element.id +
> "]").removeClass(errorClass);
>         $(element).closest('fieldset').removeClass(errorClass);
>     }
> });
>
>
>
> On Thu, Dec 17, 2009 at 11:40, Joey Toc <tocj...@gmail.com> wrote:
>
>> Hi there,
>>
>> I have a form validated with the Validation JQuery. I want to turn the
>> fieldset or legend red after an error message comes up. I have this;
>>
>> - Form ---------------------------------
>> -----------Fieldset ---------------------------
>> --------------------------------Legend(must be red after
>> error)--------------------
>> Radio button 1
>> Radio button 2
>> Radio button 3
>> -------------------------------- end of legend--------------------
>> ----------- end of fieldset ---------------------------
>>
>>
>> -----------Fieldset  2 ---------------------------
>> --------------------------------Legend 2(must be red after
>> error)--------------------
>> Radio button 1
>> Radio button 2
>> Radio button 3
>> -------------------------------- end of legend 2--------------------
>> ----------- end of fieldset 2 ---------------------------
>> - end of form ---------------------------------
>>
>> I hope u understand my problem?
>> Is this possible with the validation jquery script?
>>
>> Thanks!
>>
>
>

Reply via email to