Accordion level one
- first item
- second item
- third item
level one
- first item
- second item
- third item
level one
- first item
- second item
- third item
<script> <BR>var heads = document.querySelectorAll(".first-level"); <BR>function headClick(event){ <BR>var target = EventUtil.getTarget(event); <BR>toggleDisplay(target.parentNode.querySelector("ul")); <BR>} <BR>for(var i=0;i<heads.length;i++){ <BR>EventUtil.addHandler(heads[i], "click", headClick); <BR>} <br><br>window.onunload = function (){ <BR>for(var i=0;i<heads.length;i++){ <BR>EventUtil.removeHandler(heads[i], "click", headClick); <BR>} <BR>heads = null; <BR>} <BR></script>