title: Why does JQuery NOT selector failed on Type Submit but works on Type Button
body: <p>I have this code, which I have changed and tweak too many times to count but it does not work if the form button is a <code>type="submit"</code> and I can live with that but is there a reason, can someone please tell me why? If I change the type to <code>type="button"</code> then it works.</p>
  
  <pre><code>$(document).ready(function () {
      $('#btnSubmit').attr('disabled', true);
      $('#myForm :input:not(#btnSubmit)').blur(function () {
          if ($('#myField').val() == '') {
              $('#btnSubmit').attr('disabled', true);
          } else {
              $('#btnSubmit').attr('disabled', false);
          }
      });
  });
  </code></pre>
  
  <p>I have about 25 JQuery books and they tell you how to use the Not operator but now where does it say the form button must have a type button and not a submit type for this to work.</p>
  
  <p>Just trying to learn.</p>
  
  <p><em><strong>Note: The code above has been change so many times as I try to figure out why.</em></strong></p>
  
  <pre><code>&lt;form name="myForm" id="myForm" method="post" action=""&gt;
    &lt;label for="myField"&gt;Name&lt;/label&gt;
    &lt;input type="text" name="myField" id="myField"&gt;
    &lt;input type="button" name="btnSubmit" id="btnSubmit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>*The issue I am having is when I click the button the button becomes disabled again: Can someone explain to me why this happens? After I enter some values and leave the field, the button is enabled, however, as soon as I click it gets disabled.</p>
  
  <p>However, if I change the input type to button, the button is not disabled on click. I am not sure why this happens. This is why I originally thought this was an error or some kind of a support issue.</p>
  
  <p>Just curious and for knowledge the benefit of knowledge.*</p>