JQuery second-level menu, displaying a small class at a time
In this example, there are two other associated cases. The demo addresses are 2.php and 3.php respectively.
Demo
XML/HTML Code
-
-
- Form
-
- Horizontal CSS Menus
- Vertical CSS Menus
- Image CSS
- Form CSS
-
- Navigation menu
-
- CSS Gallery
- Menu Gallery
- Web Design News
- CSS Examples
- CSS Compressor
- CSS Forums
-
- Paging
-
-
-
JavaScript Code
- <Script type = "text/javascript">
-
-
- Ddaccordion. init ({
- Headerclass: "expandable", // Shared CSS class name of headers group that are expandable
- Contentclass: "categoryitems", // Shared CSS class name of contents group
- Revealtype: "click", // Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
- Mouseoverdelay: 200, // if revealtype = "mouseover", set delay in milliseconds before header expands onMouseover
- Collapseprev: true, // Collapse previous content (so only one open at any time )? True/false
- Defaultexpanded: [0], // index of content (s) open by default [index1, index2, etc]. [] denotes no content
- Onemustopen: false, // Specify whether at least one header shocould be open always (so never all headers closed)
- Animatedefault: false, // shocould contents open by default be animated into view?
- Persiststate: true, // persist state of opened contents within browser session?
- Toggleclass: ["", "openheader"], // Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
- Togglehtml: ["prefix", "", ""], // Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1 ", "html2"] (see docs)
- Animatespeed: "fast", // speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
- Oninit: function (headers, expandedindices) {// custom code to run when headers have initalized
- // Do nothing
- },
- Onopenclose: function (header, index, state, isuseractivated) {// custom code to run whenever a header is opened or closed
- // Do nothing
- }
- })
-
-
- </Script>
Address: http://www.freejs.net/article_daohangcaidan_146.html