Accordion demo

Description
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>
			<ex:accordionItem t:id="item2" title="literal:title2">
				Content 2 coded in body
			</ex:accordionItem>
		</ex:accordion>
		
		<input type="button" onclick="accordion.open('item1')" value="Open first item"/>
		<input type="button" onclick="accordion.close('item1')" value="Close first item"/>