You don't need any of that stuff if you have jQuery:

1. it handles events for you
2. it selects element with CSS3 selectors
3. built-in function for hide/show and effects

This (not tested) should do the same as your code:

$(document).ready(function(){
    var subs = $('#container > ul ul');
    subs.hide(); //hide all submenus
    $('#container > ul > li a').click(function(){ //add an event
listener
          subs.hide(); //hide all submenus
          this.next('ul').show(); //show the <ul> next to this <a>
    });
});

On Nov 24, 5:00 pm, firstarsbrnwhite <[EMAIL PROTECTED]> wrote:
> I removed
>
> toggleMenu.addEvent(window, 'load', function(){toggleMenu.init
> ('menu','hidden');});
>
> and now works as I want it to in FF3

Reply via email to