Hey,

I have a problem I can't solve myself anymore.. I got the following
menu-structure in HTML

<ul class="level_1">
   <li class="submenu"><a href="#" class="submenu first">Link 1</a>
      <ul class="level_2">
         <li class="first"><a href="#" class="first">Sublink 1</a></
li>
         <li class="first"><a href="#" class="first">Sublink 2</a></
li>
      </ul>
   </li>
   <li class="submenu"><a href="#" class="submenu first">Link 2</a>
      <ul class="level_2">
         <li class="first"><a href="#" class="first">Sublink 3</a></
li>
         <li class="first"><a href="#" class="first">Sublink 4</a></
li>
         <li class="first"><a href="#" class="first">Sublink 5</a></
li>
      </ul>
   </li>
   <li class="submenu"><a href="#" class="submenu first">Link 3</a>
      <ul class="level_2">
         <li class="first"><a href="#" class="first">Sublink 6</a></
li>
         <li class="first"><a href="#" class="first">Sublink 7</a></
li>
         <li class="first"><a href="#" class="first">Sublink 8</a></
li>
         <li class="first"><a href="#" class="first">Sublink 9</a></
li>
      </ul>
   </li>
</ul>

No i want to collapse  the menu, so online Link 1, Link 2 and Link 3
can be seen. When I click on one of them, only the supposed submenu
should open.. So if I click Link 3, Sublink 6 - 9 should open.

How can I realize that, I was trying something like this, but with
this approach, all submenus open no matter what main link I click..

$j('.submenu').each(function(i) {
    $j(this).click(function() {
            all_hide_slow();
                // $j('#sub_'+i).show('slow');
                $j('ul.level_2').show('slow');
        });
});

I would appreciate any help.. thanks
pabera

Reply via email to