HTML and CSS Reference
In-Depth Information
<span
id=
"title"
>
accordion
</span>
<input
type=
"button"
value=
"home"
class=
"w_button w_radius w_bg_light w_right"
onclick=
"window.location='..?theme='+theme"
/>
</div>
<div
class=
"w_bloc"
>
click on the accordion section below to display the content.
</div>
<div
id=
"output"
style=
"width: 95%; margin: auto"
>
</div>
</body>
</html>
To set up the component shown in
Figure 3-22
, use:
var
accordion
,
section1
,
section2
,
section3
;
init
=
function
()
{
accordion
=
new
wink
.
ui
.
layout
.
Accordion
();
section1
=
accordion
.
addSection
(
'Section1'
,
'Hello World'
);
section2
=
accordion
.
addSection
(
'section2'
,
'...'
);
section3
=
accordion
.
addSection
(
'section3'
,
'...'
);
$
(
'output'
).
appendChild
(
accordion
.
getDomNode
());
}
deleteSection
=
function
()
{
accordion
.
deleteSection
(
section2
);
Figure 3-22. Wink Accordion component