jquery this selector after clicked element removed
<p>I want to empty content of div with class dialogBody and then append returned ajax response. See the code below please. The problem I have is .html(response) doesn't do anything because clicked element is removed. How can I carry over the target element which is $this.closest('.dialogBody') after clicked element was removed?</p>

<pre><code>&lt;div class="dialogBody"&gt;
  &lt;p&gt;Some content&lt;a href="/question/33" class="ajaxReplace"&gt;Click to show question&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;script&gt;
$(".ajaxReplace").live("click", function(e){
  e.preventDefault();
  var $this = $(this);
  $this.closest('.dialogBody').empty();          
  ajaxUrl = $(this).attr("href")+"?ajax=1";
  $.ajax({ 
    type: "POST",
    url: ajaxUrl,
    success: function(response){          
      $this.closest('.dialogBody').html(response);  
      console.log(response);
    }
  })                 
});   
&lt;/script&gt;
</code></pre>
