title: Accessing The pathname of an anchor tag
body: <p>I can see the value of the pathname of my anchor tag in firebug, but I am having a hard time accessing it</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
        $(document).ready(function() {
  
            $("a").click(function() {
                alert("Hi");
  
                $.ajax({
                    type: "POST",
                    url: "NickTracker.asmx/LogActivity",
                    contentType: "application/json; charset=utf-8",
                    data: "{'path': '" + attr('pathname') + "'}",
                    dataType: "json",
                    success: AjaxSucceeded,
                    error: AjaxFailed
                });
  
            });
  
        });
        function AjaxSucceeded(result) {
            alert(result.d);
        }
        function AjaxFailed(result) {
            alert(result.status + ' ' + result.statusText);
        }  
    &lt;/script&gt;  
  </code></pre>
  
  <p>Here is my html</p>
  
  <pre><code>&lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
      Page 1&lt;br /&gt;
          &lt;br /&gt;
  &amp;nbsp;&lt;a href="http://manual.aspdotnetstorefront.com/p-157-xml-packages.aspx"&gt;Manual&lt;/a&gt;
      &lt;br /&gt;
      &lt;a href="http://www.google.com/"&gt;googles&lt;/a&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>When a user clicks I want the path returned, this doesnt work-attr('pathname')</p>