Jquery - Apply class based on contents of <a>
<p>I have a horizontal navigation menu which I can edit the source of, my only option is to add classes dynamically when it loads through JQUERY.</p>

<p>Imagine I have 3 tabs:</p>

<pre><code>Home, Profile, Blog
</code></pre>

<p>Each with a link like so:</p>

<pre><code>&lt;a href="home.html"&gt;Home&lt;/a&gt;
</code></pre>

<p>Is it possible for JQUERY to look between the <code>&lt;a&gt; &lt;/a&gt;</code> tags and find the text (E.g. Home) and use that text as the class?</p>

<p>So my <code>&lt;a href="home.html"&gt;</code> becomes: <code>&lt;a class="Home" href="home.html"&gt;</code></p>
