Im am using errorPlacement to add a class to a label to show a graphic element in addition to the error text ( they are both different elements).
Is there a way to u
You might want to check out the success
option.
http://docs.jquery.com/Plugins/Validation/validate#options
$("#myform").validate({
success: function(label) {
label.addClass("valid").text("Ok!")
},
submitHandler: function() { alert("Submitted!") }
})
If you pass a function to success
, you are given back the label as a jQuery object. You can then manipulate that object or a related object.
Alternatively, your error and success graphic can use a background image, and then you can swap out the background image with CSS on the validClass
.