title: Button disable and enable not working in Jquery
body: <p>I have a Jquery for click a button to add items to list.here I need to disable the button after click on it and after success it will be enable.here is my Code</p>
  
  <pre><code>$(".addtowishlist").live("click", function (e) {
          var t = $(this);
          $('&lt;img src="/images/loading.gif" alt="loading" id="ajax-loader-wish"/&gt;').insertAfter(t);
          $("#simplemodal-overlay").unbind("click");
          var n = t.parent().find("select[name='code']").val();
  
          var i = t.parent().find("input:hidden[name='account']").val();
          var s = t.parent().find("input:hidden[name='itemname']").val();
          var o = t.parent().find("input:hidden[name='itemnumber']").val();
          var u = (new URI).addQuery("code", n).addQuery("qty", 0).addQuery("addtowishlist", true).addQuery("account", i).addQuery("itemname", s).addQuery("itemnumber", o);
          $.ajax({
              url: u,
              type: "GET",
              success: function (e) {
                  t.closest(".innerwishlist").hide();
                  $(".wishlistThankYou").show()
              }
          });
          return false
      });
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>$(".addtowishlist").attr('disabled', 'disabled'); 
  and code for enable 
  
   $(".addtowishlist").attr('disabled', ''); 
  </code></pre>
  
  <p>its works and disable the button but it doesn't enable the button after success.
  anybody help ?</p>