Widgets > wijaccordion > Apply Animation |
The wijaccordion widget supports animation. Simply set the animated option to take advantage of this feature. See the Accordion > Animation sample of the MVC Control Explorer live demo at http://demo.componentone.com/ASPNET/MVCExplorer/accordion/Animation.
<body>
tags of the page. Notice that there are two different <div id="accordion"> elements. You're going to set animation for two of the panes and disable animation for the other two panes.
<div id="accordion">
<h3>Pane 1</h3>
<div>
<p>
Pane 1 content here.
</p>
</div>
<h3>Pane 2</h3>
<div>
<p>
Pane 2 content here.
</p>
</div>
</div>
<div id="accordion2">
<h3>
Pane 3</h3>
<div>
<p>
Pane 3 content here.
</p>
</div>
<h3>
Pane 4</h3>
<div>
<p>
Pane 4 content here.
</p>
</div>
</div>
</div>
tag you added in the previous step, enter the following jQuery script to initialize the wijaccordion widget and set the animated options.
<script id="scriptInit" type="text/javascript">
$(document).ready(function () {
$("#accordion").wijaccordion({
animated: "easeInOutBounce", duration: 700,
});
$("#accordion2").wijaccordion({
animated: false
});
});
</script>