title: this.href vs $(this).attr('href')
body: <p>After reading this article <a href="http://net.tutsplus.com/tutorials/javascript-ajax/14-helpful-jquery-tricks-notes-and-best-practices/">net.tutsplus.com/tutorials/javascript-ajax/14-helpful-jquery-tricks-notes-and-best-practices/</a>   I came to conclusion that using <strong>this.href</strong>  is more efficient. </p>
  
  <p>However, when I tried to use it on one of my projects, I saw that <strong>this.href</strong> returns not only href but also appends a url of a website. For example <code>&lt;a href="tab-04"&gt;&lt;/a&gt;</code><strong>this.href</strong> will return <a href="http://example.com/abc/tab-04">http://example.com/abc/tab-04</a> and <strong>$(this).attr('href')</strong> will return only tab-04. </p>
  
  <p>You can see an example here <a href="http://jsfiddle.net/UC2xA/1/">http://jsfiddle.net/UC2xA/1/</a>. </p>
  
  <p><strong>$(this).attr('href')</strong> however returns exactly what I need and nothing more. </p>
  
  <p>My question is this, how can I rewrite (or do what is necessary) <strong>this.href</strong> so that it would only return <strong>tab-04</strong>?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Doug you are right on the money with <pre>this.getAttribute('href')</pre></p>