Get anchor href attribute using JQuery
<p>I have a button with the following javascript function:</p>

<pre><code>function getHyperLink(){
  window.getSelection().anchorNode.parentNode.attributes["0"].nodeValue;
}
</code></pre>

<p>What i do is i highlight a text which contains a hyperlink, i then press the button and want go get the link from selected text.</p>

<p>The following above works but i want my code to be in jQuery if possible.</p>
