Answers for "jquery not empty value"

1

jquery if null or empty

if (jQuery('#something').val().length != ''){}
or
if (jQuery('#something').val().length != 0){}
Posted by: Guest on July-29-2020
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 "Javascript"

Browse Popular Code Answers by Language