Changing a link's href attribute based on it's text with jQuery
<p>I have seen similar threads and have tried the syntax's in their solutions, but nothing is working.</p>

<p>I want to change the href attribute of all links of a certain type a page, based on the text of the link. Here is what I have now:</p>

<pre><code>$('.class li a').attr('href', '#' + $(this).text());
</code></pre>

<p><code>$(this).text()</code> doesn't seem to be returning anything. It has been awhile since I've worked with jQuery so I am confused by this problem. I have also tried <code>.val()</code> and <code>.html()</code>.</p>
