jQuery check if exists and has a value January 25, 2023 by Tarik The input won’t have a value if it doesn’t exist. Try this… if($('.input1').val())