title: How can I remove an attribute with jQuery?
body: <p>I can't seem to get <code>removeAttr</code> to work, I'm using the example I saw on the jQuery site. Basically <code>onclick</code> I add the attribute to disable a field (which works just fine) but when the user clicks again it should enable the field in question. I used alerts to make sure the else block is being fired, so I know that's not it.</p>
  
  <p>Code:</p>
  
  <pre><code>$('#WindowOpen').click(function (event) {
    event.preventDefault();
    $('#forgot_pw').slideToggle(600);
  
    if('#forgot_pw') {
      $('#login_uname, #login_pass').attr('disabled','disabled');
    } else {
      $('#login_uname, #login_pass').removeAttr('disabled');
    }
  });
  </code></pre>
  
  <p>Thanks.</p>