Change jquery variable for each instance it's used on a page
<p>I am setting up a page that has multiple links to different documents. Since the names of the links match the documents they are linked to, I thought I would write a script that takes the inner html of anything underlined and generates a link tag around it and inputs each particular link name in the link.</p>

<p>The script I wrote runs fine except it only runs once and updates all links with one identical link for each. Is there a way I can make it take each instance and change them individually?</p>

<p>Sorry if I've butchered my explaination!</p>

<p>Here is my current code:</p>

<pre><code>&lt;u&gt;Link1&lt;/u&gt;
&lt;u&gt;Link2&lt;/u&gt;

&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;

&lt;script&gt;
innerU = $("u").html();
$("u").html("&lt;a href=mywebsite.com/" + innerU + ".pdf&gt;" + innerU + "&lt;/a&gt;");
&lt;/script&gt;
</code></pre>
