OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 @MAC-DENY:AXLayoutComplete* |
| 3 @MAC-DENY:AXLoadComplete* |
| 4 --> |
| 5 <!DOCTYPE html> |
| 6 <html> |
| 7 <body> |
| 8 <a aria-expanded="true" id="title" href="#" on>Toggle</a> |
| 9 <ul id="list"> |
| 10 <li>ListItem 1</li> |
| 11 <li>ListItem 2</li> |
| 12 <li>ListItem 3</li> |
| 13 <li>ListItem 4</li> |
| 14 </ul> |
| 15 <script> |
| 16 function toggle(listNode, titleNode) { |
| 17 var list = document.getElementById(listNode); |
| 18 if (list.style.visibility != 'hidden') { |
| 19 list.style.visibility = 'hidden'; |
| 20 document.getElementById(titleNode).setAttribute('aria-expanded', 'false'); |
| 21 } else { |
| 22 list.style.visibility = 'visible'; |
| 23 document.getElementById(titleNode).setAttribute('aria-expanded', 'true'); |
| 24 } |
| 25 } |
| 26 function go() { |
| 27 toggle('list', 'title'); |
| 28 } |
| 29 </script> |
| 30 </body> |
| 31 </html> |
OLD | NEW |