jquery how to make current ul visible/display block?
<p>Im building a menu dynamically and then a sub menu inside this dynamically also. </p>

<p>The submenu is hidden and then when the user hovers over te main menu link the submenu appears.</p>

<p>what i need to do is if the sub menu li has a class 'on' then i need that submenu ul to be given the attr visible or display block?</p>

<p>so i need some sort of jquery when the page loads if the submenu contain li with class on then that submenu gets the attr visible?</p>

<p>This is my menu:</p>

<pre><code> &lt;div class="sideMenu2"&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href&gt;retail&lt;/a&gt;
               &lt;ul class="subsideMenu2"&gt;
                    &lt;li class= "on"&gt;&lt;a href="/portfolio/5/0"&gt;cabot circus&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="/portfolio/6/0"&gt;st. stephen&amp;#39;s&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="/portfolio/7/0"&gt;silverburn&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="/portfolio/8/0"&gt;the elements&lt;/a&gt;&lt;/li&gt;
               &lt;/ul&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;a href&gt;sports &amp;amp; leisure&lt;/a&gt;
               &lt;ul class="subsideMenu2"&gt;
                     &lt;li&gt;&lt;a href="/portfolio/19/0"&gt;test&lt;/a&gt;&lt;/li&gt;
               &lt;/ul&gt;
            &lt;/li&gt;
       &lt;/ul&gt;  
   &lt;/div&gt;
</code></pre>
