 <p>You should try this simple solution :</p> <pre><code>jQuery(function($) { $('form input').on('change',function() { isDisabled = !(($('#txtusername').val().length &gt; 0 &amp;&amp; $('#txtpassword').val().length &gt; 0) || $('input[type="checkbox"]:checked').length &gt; 0); $('#signin').attr('disabled', isDisabled); }); }); </code></pre> <p>It does its job. </p>