Pulling and placing a href with jQuery
<p>I'm trying to pull the <code>a href</code> from a dynamic link and inserting the <code>a href</code> src into another link.</p>

<p>An extract from my HTML code:</p>

<pre><code>&lt;li id="source_ahref"&gt;&lt;a href="http://www.sitepoint.com/forums/showthread.php?p=4729682#post4729682"&gt;This is the Source Link&lt;/a&gt;&lt;/li&gt;
&lt;li class="text"&gt;Support Document 4&amp;nbsp;&lt;a id="target_ahref" href="#"&gt;Read Document&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>My Javascript code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
  var theHref = $("#source_ahref a:first").attr("href");
  $("#target_ahref a:first").attr("href", theHref);
&lt;/script&gt;
</code></pre>

<p>You can see my complete code at <a href="http://jsfiddle.net/prodac/Azr7K/" rel="nofollow">http://jsfiddle.net/prodac/Azr7K/</a></p>

<p>Thank you! :)</p>
