title: Get href value after loading the link with AJAX in jQuery
body: <p>I am trying to update a single record in my database with AJAX. Everything is working fine, but when the result is returned, it looks fine, but if a.update is clicked again (for the returned element) I get the href opened (so the second time the attr() doesn't work for some reason). I am very new to jQuery and ajax :)</p>
  
  <pre><code>    // Update Single Item   
  $('li a.update').click(function () {
  updateURL = $(this).attr("href");
  $(this).attr("href", "#");
  theContainer = $(this).parents('li');
      $.ajax({
      type: "GET",
      dataType: 'json',
      url: updateURL,
          async: false,
      success: function(data){
          theContainer.replaceWith(data.html).fadeIn(300);
      }
  
      });
      return false;
      });
  </code></pre>
  
  <p>p.s. The List element is generated with PHP. When I request a single <code>&lt;li&gt;</code> element, I generate it with the exact same template (by default everything is printed with a foreach loop, afterwards AJAX requests get back a JSON with <code>&lt;li&gt;...&lt;/li&gt;</code>)</p>