validating a field using jquery -
rather using jquery plugin. if have 2 fields , first field required , on focus. if click or tab on next field how can check jquery see if field contains data , if doesnt append text or class next it? onblur() used or?
thanks
yeah, you're close.
you like:
$('input[name="data"]').blur(function() { if($(this).val().length == 0) { // add text or whatever } });
Comments
Post a Comment