K
krimgelas
Hello,
I am using the technique explained in Negrino & Smith "Javascript for the
World Wide Web" to make a sliding menu. The example they give can be found
on their companion website:
http://www.javascriptworld.com/js4e/scripts/chap13/script02.html
In my own case each submenu has links, not just text as in the example. My
website is written in PHP and the content is loaded dynamically depending
on some variables contained in the links. For example, the menu would look
like:
Gallery
|_ Category 1
|_ Category 2
|_ Category 3
When I click on a link in a submenu, the page is reloaded with different
variables defining the content: e.g.
http://index.php?option=view&view=gallery&category=1
The problem I am facing now is that each time the page gets reloaded to put
the requested content, the menu collapses, so the subcategories disappear
and you have to click on the main menu item again to make the subitems
appear.
How can I modify the example so that the submenu keeps expanded every time
that a submenu item has been selected?
Thanks very much for any help provided.
Regards,
Kris
but
I am using the technique explained in Negrino & Smith "Javascript for the
World Wide Web" to make a sliding menu. The example they give can be found
on their companion website:
http://www.javascriptworld.com/js4e/scripts/chap13/script02.html
In my own case each submenu has links, not just text as in the example. My
website is written in PHP and the content is loaded dynamically depending
on some variables contained in the links. For example, the menu would look
like:
Gallery
|_ Category 1
|_ Category 2
|_ Category 3
When I click on a link in a submenu, the page is reloaded with different
variables defining the content: e.g.
http://index.php?option=view&view=gallery&category=1
The problem I am facing now is that each time the page gets reloaded to put
the requested content, the menu collapses, so the subcategories disappear
and you have to click on the main menu item again to make the subitems
appear.
How can I modify the example so that the submenu keeps expanded every time
that a submenu item has been selected?
Thanks very much for any help provided.
Regards,
Kris
but