title: JQuery Enable / Disable Submit Button in IE7
body: <p>I am using the following code to disable the submit button</p>
  
  <pre><code>$("input[type='submit']").attr("disabled", "disabled");
  </code></pre>
  
  <p>And this code to re-enable it:</p>
  
  <pre><code>$("input[type='submit']").removeAttr("disabled");
  </code></pre>
  
  <p>It works fine on all browsers I've tried except Internet Explorer 7. IE7 will disable the button fine, but when it is re-enabled, the button still <em>looks</em> disabled.</p>
  
  <p>This button is enabled and clickable in spite of the cursor and gray color:</p>
  
  <p><img src="https://i.stack.imgur.com/8zS73.jpg" alt="IE7 enabled button with disabled appearance"></p>
  
  <p>(A colleague had the same trouble with IE8, but I could not reproduce it.)</p>
  
  <p>I have a workaround in place that does the job, but its ugly. I have two buttons, one disabled, one not. To start, I show the disabled one and hide the enabled button.</p>
  
  <pre><code>$("input[type='submit']:first").css("display","inline"); //show disabled
  $("input[type='submit']:last").css("display","none");    //hide enabled
  ...
  &lt;input name="Submit" type="submit" value=" Sign In " tabindex=3 disabled&gt;
  &lt;input name="Submit" type="submit" value=" Sign In " tabindex=3 &gt;
  </code></pre>
  
  <p>When my "if" conditions are met, I hide the disabled submit and show the enabled one.</p>
  
  <p><strong>Is there a more elegant CSS or JQ based solution to this problem?</strong></p>