lundi 2 mai 2016

Css style checkbox when not checked with jQuery validator

I want my checkbox to change label color if not checked. I'm using jQuery validator. I don't want the label to show, I just want to change the I Accept change to red.

Validation

jQuery.extend(jQuery.validator.messages, {
  required:"This field is required",
  email: "A valid email address is required"
});

Checkbox

<label for="cbx2">
   <input name="TermsCondition" type="checkbox" value="on" style="float:left;" class="required" id="cbx2">
   <strong>I Accept</strong>
</label>

Css

label.error {
    font: 0/0 a;
}




Aucun commentaire:

Enregistrer un commentaire