jquery slide up menu
<p>i want first to hide all submenus and after click on on the span.expand all submenus should be shown.</p>

<p>this is my HTML:</p>

<pre><code>&lt;div class="ym-gbox"&gt;
    &lt;ul&gt;
        &lt;li&gt;menu1&lt;/li&gt;
        &lt;li&gt;menu2&lt;/li&gt;
        &lt;ul&gt;
            &lt;li&gt;submenu1&lt;/li&gt;
            &lt;li&gt;submenu2&lt;/li&gt;
        &lt;/ul&gt;
        &lt;ul&gt;
            &lt;li&gt;submenu1&lt;/li&gt;
            &lt;li&gt;submenu2&lt;/li&gt;
        &lt;/ul&gt;  
    &lt;/ul&gt;
&lt;/div&gt;

&lt;div id="expandbutton"&gt;
    &lt;span class="button expand"&gt;expand&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>and my jQuery:</p>

<pre><code>jQuery(document).ready(function($) {
    $('.ym-gbox ul li ul li').hide();

        $('.expand').click(function() {
        if ($(this).hasClass('act')) {
            $(this).removeClass('act');
            $('.ym-gbox ul li').not('.menuactive').children('ul').children('li').slideUp('fast');
        } else {
            $(this).addClass('act'); 
            $('.ym-gbox ul li ul li').slideDown('fast');  
        }

    });
});
</code></pre>

<p>What i'm doing wrong?</p>
