GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing javascript.info — Create a sliding menu back to the lesson Create a sliding menuimportance: 5 Create a menu that opens/collapses on click: P.S. HTML/CSS of the source document is to be modified. HTML/CSSFirst let’s create HTML/CSS. A menu is a standalone graphical component on the page, so it’s better to put it into a single DOM element. A list of menu items can be laid out as a list Here’s the example structure:
We use Like this:
So if we set As
Toggling the menuToggling the menu should change the arrow and show/hide the menu list. All these changes are perfectly handled by CSS. In JavaScript we should label the current state of the menu by adding/removing the class Without it, the menu will be closed:
…And with
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |