Onclick menu simultaneously shows its submenu and load its link without hiding the submenu
<p>It is about my JS for menu. I used it in a Joomla template. It shows and hides the submenu and changes the clicked menu class into active, but didn't load the content of the clicked menu.</p>

<pre><code>var menu_ul = jQuery('.menu &gt; li &gt; ul &gt; li &gt; ul'),
menu_a  = jQuery('.menu &gt; li &gt; ul &gt; li &gt; a');

menu_ul.hide();

menu_a.click(function(e) {
e.preventDefault();
    if(!jQuery(this).hasClass('active')) { 
        menu_a.removeClass('active');
        menu_ul.filter(':visible').slideUp('normal');
        jQuery(this).addClass('active').next().stop(true,true).slideDown('normal');
    } else {
        jQuery(this).removeClass('active');
        jQuery(this).next().stop(true,true).slideUp('normal');
    }
});
</code></pre>
