Answers for "jquery if input is empty"

1

jquery check if input is empty on submit

var empty = true;
$('input[type="text"]').each(function() {
   if ($(this).val() != "") {
      empty = false;
      return false;
   }
});
Posted by: Guest on March-10-2021
0

check fro text input jquery

$('#apply-form input').blur(function()
{
    if( !$(this).val() ) {
          $(this).parents('p').addClass('warning');
    }
});
Posted by: Guest on October-06-2020

Code answers related to "jquery if input is empty"

Code answers related to "Javascript"

Browse Popular Code Answers by Language