Accordion demo

This page shows the way to interact with the accordion with JavaScript.
It also boots the duration of the accordion animation

In Action
  • title1
    Content coded in body
  • title2
    Content 2 coded in body

TML Source code

		<ex:accordion t:id="accordion" duration="0.2">
			<ex:accordionItem t:id="item1" title="literal:title1" opened="true">
				Content coded in body	
			<ex:accordionItem t:id="item2" title="literal:title2">
				Content 2 coded in body
		<input type="button" onclick="'item1')" value="Open first item"/>
		<input type="button" onclick="accordion.close('item1')" value="Close first item"/>