Toggle widget

  1. initialize a toggle function by adding module ID
  2. class name for trigger: toggle-trigger; class name for target panel: toggle-target
  3. required YUI: yahoo-dom-event
config: {
parentnode:
[wrapping tag, wrapping classname],default:['span','toggle']
togglenode:
[toggle tag, toggle classname],default:['span','toggle-trigger']
switchclass:
[open className, close className],default:['on','off']
defclass:
default className,default:'off'
docclick:
whether or not to enable document click event for closing open panel, default:'false'
}
date:2006
前面有字 class = toggle-trigger 後面也有字
sub toggle trigger
class=toggle-target.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec tortor ligula, consequat a, aliquam vitae, pulvinar eget, erat. Pellentesque turpis elit, lobortis eget, vestibulum eget, aliquam sed, lectus. Sed consectetuer. Quisque pretium ornare purus. Sed ac tellus eu ipsum sodales porttitor. Quisque orci odio, varius gravida, lacinia a, dictum eu, augue. Aliquam erat volutpat. Suspendisse ac tortor. Curabitur feugiat massa in elit. Suspendisse metus mi, accumsan faucibus, aliquet eu, pulvinar eu, lorem.

a following module

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec tortor ligula, consequat a, aliquam vitae, pulvinar eget, erat. Pellentesque turpis elit, lobortis eget, vestibulum eget, aliquam sed, lectus. Sed consectetuer. Quisque pretium ornare purus. Sed ac tellus eu ipsum sodales porttitor. Quisque orci odio, varius gravida, lacinia a, dictum eu, augue. Aliquam erat volutpat. Suspendisse ac tortor. Curabitur feugiat massa in elit. Suspendisse metus mi, accumsan faucibus, aliquet eu, pulvinar eu, lorem.