Using JS and Page ids to keep expanding submenu divs shown

Discussion in 'JavaScript' started by Sprocket, Jan 18, 2007.

  1. #1
    Heyas,
    I'm not a web developer, and I'm not very good at creating my own JS code. What I am working on right now is a website, it's index is a template in asp that pulls in all the sections of the page (nav, header, html docs etc)
    I built a very simple expand and contract on click javascript menu using JS and CSS.
    What I wish it would also do is have the submenus remain open when the page in the submenu is opened. I was thinking I could maybe do something like a page ID, on those submenu pages and then it would know if the page ID is Menu1, to keep the div class="show" if not class="hide"

    I did that with my asp layout, but I'm trying to cut out the asp just incase my site is moved to a server that doesn't support it. Does anyone know if you can do this in Javascript?

    Sorry if this doesn't make sense.
     
    Sprocket, Jan 18, 2007 IP