Here is the actual js in case you don't want to follow the link:

document.observe("dom:loaded", function() {
        var divs = $$("div.content");
        divs.invoke('hide').first().show();
        var subs = $$("ul#nav ul");
        subs.invoke("hide")
        $$("a.more").each(function(link) {
                var section_id = link.readAttribute("href").sub("#",'');
                link.observe("click", function(event) {
                        subs.invoke("hide");
                        var element = Event.element(event);
                        $(element).next('ul').show();
                        divs.invoke("hide");
                        $(section_id).show();
                        event.preventDefault();
                });
        });
});

On Sep 23, 12:20 pm, solidhex <[EMAIL PROTECTED]> wrote:
> Hi All
>
> I need to setup a show/hide navigation with nested <ul> elements. I've
> gotten it to work, but it seems like my code is kind of clunky and
> sloppy. Anyone have any ideas on how to make it better? Looking
> forward to hearing input.
>
> Oh, and this is my first discussion here :)
>
> http://solidhex.com/code-samples/prototype/list.html
>
> thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to