title: jQuery: Add Class to AJAX-loaded Pagination
body: <pre><code>$(".paginate li").click(function(){
      $(this).attr('class','current');    
      $("#ajax_results").load("test.php?page=" + $(this).attr('rel')).fadeIn();
  });
  </code></pre>
  
  <p>The above code is for a pagination script.  When the user clicks the pagination &lt;li&gt; the AJAX script fires off a request based on the rel value.  The issue I am having is with:</p>
  
  <pre><code>$(this).attr('class','current');
  </code></pre>
  
  <p>It applies for a brief second and then vanishes.  Ideally it would apply a class of 'current' to the clicked &lt;li&gt; and remain.  I'm not sure why it is being removed immediately after being applied.</p>