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

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -