Using jQuery to find certain text, then add class onto the following UL
<p>So I am trying to add a class onto a UL depending on the text used in the navigation.</p>

<p>For example.</p>

<pre><code>   &lt;li&gt;
        &lt;a href="#"&gt;Text&lt;/a&gt;
        &lt;ul&gt;
        &lt;/ul&gt;
   &lt;/li&gt;
</code></pre>

<p>I want to add a class onto the ul depending on the text inside the a tag, to find the text I just use the a:contains method </p>

<pre><code>$('#nav &gt; li &gt; a:contains("text")')
</code></pre>

<p>After that I draw a blank on how to add a class onto the ul that follows, I thought the .next might work but it turns out it doesn't.</p>

<p>Any help would be greatly appreciated! </p>
