 <p>Try this... You can do it in single line...</p> <pre><code>formSubmit = isValidToggle($('#rta_cl_fn'), $('#div_cl_fn')) &amp;&amp; isValidToggle($('#rta_cl_ln'), $('#div_cl_ln')) &amp;&amp; isValidToggle($('#rta_cl_ph'), $('#div_cl_ph')) &amp;&amp; isValidToggle($('#rta_cl_mob'), $('#div_cl_mob')) </code></pre> <p>in this, it will check first one condition and if it is true then It will check further condition otherwise it will take you out.</p>