Yes the code does work :) I was just curious if there were any tips or short cuts anyone had. In particular, I was trying to condense some of the code down, but I can't seem to figure out a way to chain hiding all the divs, and only showing the current one, instead of splitting it into two lines. This part:
divs.invoke("hide"); $(section_id).show(); I know there is a way to filter in jQuery and was wondering if there was something similar in Prototype. On Sep 24, 9:18 am, "Justin Perkins" <[EMAIL PROTECTED]> wrote: > I prefer not to nest my code like that, I feel like it is difficult to > read and hard to extend/modify (read: fragile), but if that's how you > like to read your code and you find it easier to read/write, then > that's all that matters. > > I think if that code works for you now, then you should just be happy > with it. Keep writing JavaScript and then revisit this code in a few > months and you'll probably have an idea or two for improving it. > > -justin --~--~---------~--~----~------------~-------~--~----~ 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 prototype-scriptaculous@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---