The HTML markup for a wijaccordion widget looks like this, with multiple sets of header area and content area elements.
Markup |
Copy Code |
---|---|
<div id="accordion"> <h3>header</h3> <div>content</div> <h3>header</h3> <div>content</div> <h3>header</h3> <div>content</div> </div> |
You can initialize the widget with the following jQuery script.
Script |
Copy Code |
---|---|
<script id="scriptInit" type="text/javascript"> require(["wijmo.wijaccordion"], function () { $(document).ready(function () { $("#accordion").wijaccordion(); }); }); </script> |
The markup and script featured here results in the following live widget. Mouse over Accordion to see the animation.