title: How to get the parameters of an href attribute of a link from the click event object
body: <p>Is there a simple way to get the parameters at the end of an href attribute of a clicked link using the click event object?</p>
  
  <p>I have some jQuery code that looks like this:</p>
  
  <pre><code>$(document).ready(function() {
      $('#pages').delegate("a", "click", function(e) {
          var formData = "parameters to clicked link";
          $.ajax({
              url: 'friends2.php',
              dataType: 'json',
              data: formData,
              success: function(data) {
                  $('#searchbutton').attr("disabled", false);
                  $('#searchresults').html(data.results);
                  $('#pages').html(data.paginate);
              }
          });//ajax end
          return false;
      });
  });
  </code></pre>
  
  <p>And here is the relevant HTML:</p>
  
  <pre><code>&lt;div id="pages"&gt;
  &lt;span class="disabled"&gt;previous&lt;/span&gt;
  &lt;span class="current"&gt;1&lt;/span&gt;
  &lt;a href="friends.php?term=ma&amp;p=2"&gt;2&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I'm trying to do is paginate the results of a search that I've done with ajax. The search runs fine and a get a list of users that match the query. The part of the results script that creates the pagination links is also working. </p>
  
  <p>In the example above, there are two pages of results. What I want to do when a user clicks the link to go to page 2 of the results is to intercept the link click and instead create a new ajax request using <code>term=ma&amp;p=2</code> as the data passed to the request.</p>
  
  <p>So, long story short, is there an easy way to get <code>term=ma&amp;p=2</code> from the event object passed the the anonymous function in my jQuery above?</p>