test value jquery code example
Example 1: jquery if null or empty
if (jQuery('#something').val().length != ''){}
or
if (jQuery('#something').val().length != 0){}
Example 2: get value of input jqueyr
var str = $("#myInput"). val();
if (jQuery('#something').val().length != ''){}
or
if (jQuery('#something').val().length != 0){}
var str = $("#myInput"). val();