title: jQuery Remove attribute in ajax
body: <p>I have an ajax call that I disable a checkbox and I then want to enable again once the ajax has finished. However I cannt remove the attribute disabled aterwards.</p>
  
  <pre><code>$(function(){ // added
      $("input:checkbox").live("click", function(){
  
          var a_href = $(this).attr('id');
          var checked = $(this).attr('checked');
          if (checked == 'checked') {
              checked = 1;
          }else {
              checked = 0
          };
  
          $(this).parent().parent().after('&lt;img class="loader" style="padding-botton:0 !important;" alt="" src="images/loaders/loader.gif"&gt;');
          $(this).attr('disabled','disabled');
  
          $.ajax( {
              type: "POST",
              url: "includes/featured.php",
              data: { id: a_href, value: checked, field: "main_feature" },
            success: function(data) {
              $('img.loader').fadeOut('slow',function(){$(this).remove()});
              $(this).removeAttr('disabled'); 
            }             
          }).done(function (data){
              }
          );
  
      return false; 
  
  
      });
  }); // added
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>.attr('disabled', false);
  </code></pre>