折叠菜单 - Switch Menu
作者:parno 日期:2007-07-15
Step 1: Insert the below code to the of your page:
引用内容
Step 2: And herein lies the HTML code for the menu itself. Add the below where you want the menu to appear on your page:
引用内容

Customization
So you're now wondering how flexible the script is when it comes to customizing the menu to your liking. The good news is, quite.
Physical changes (adding/deleting items) to the menu are all done in the code of Step 2. Study it for a while, and you'll soon see the required structure. All menu items must be added within the "masterdiv' DIV. For each item, wrap the containing links in a SPAN tag with a unique incrementing ID starting with "sub1", (ie: "sub1", "sub2" etc), and use this ID within the onClick event handler to expand/contract it. As you can see in the demo, an image can be used for the menu item itself instead of plain text.
To make cosmetic changes to the menu, it is recommended you do so via CSS, by editing the style sheet of Step 1.
Enjoy this fully DOMesticated script!

Step 2: And herein lies the HTML code for the menu itself. Add the below where you want the menu to appear on your page:


Customization
So you're now wondering how flexible the script is when it comes to customizing the menu to your liking. The good news is, quite.
Physical changes (adding/deleting items) to the menu are all done in the code of Step 2. Study it for a while, and you'll soon see the required structure. All menu items must be added within the "masterdiv' DIV. For each item, wrap the containing links in a SPAN tag with a unique incrementing ID starting with "sub1", (ie: "sub1", "sub2" etc), and use this ID within the onClick event handler to expand/contract it. As you can see in the demo, an image can be used for the menu item itself instead of plain text.
To make cosmetic changes to the menu, it is recommended you do so via CSS, by editing the style sheet of Step 1.
Enjoy this fully DOMesticated script!
[本日志由 parno 于 2018-09-24 11:04 AM 更新]






评论: 0 | 引用: 0 | 查看次数: 7505