How to Set the Parent Class of an Unordered List
<p>I have the following ul setup:</p>

<pre><code>        &lt;div id="sidebar"&gt;
        &lt;ul id="themenu" class="sf-menu sf-vertical"&gt;

            &lt;li&gt;
                &lt;a class="sf-with-ul topm" href="#"&gt;Musical Instruments&lt;/a&gt;
                &lt;ul class="bullet"&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Guitars&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Drums&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Keyboards&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Brass&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
        &lt;/div&gt;
</code></pre>

<p>My question is, in addition to the above, I have other top-level menus with sub-menus that when a top-level menu is selected, it is highlighted "Green" based on a class I have created called "currentMenu".</p>

<p>My jQuery works fine for top-level menu items for setting them to "Green" as each top-level menu is toggled but what I am unsure how to do, is that when the user selects say the sub-menu "Drums" in the above code, I want it's parent top-level menu set to "currentMenu" class.
In this case, the top-level button "Musical Instruments" would be set.</p>

<p>I am unsure how to do. I tried something like:</p>

<pre><code>    $('ul.sf-menu li a').click(function() {

        if($(this).hasClass('nosub')) {
            $("ul.sf-menu li ul li a").removeClass("currentSubMenu");
        }
        else {
            $("ul.sf-menu li a").not(this).removeClass("currentMenu");
            $("ul.bullet li a").parent().this.addClass("currentMenu");
        }
    });     
</code></pre>

<p>It's this line I'm not sure about:</p>

<pre><code>$("ul.bullet li a").parent().this.addClass("currentMenu");
</code></pre>

<p>Any help would be great.</p>

<p>Thanks.</p>
