Simon Willison’s Weblog



2nd November 2002

The trend for DHTML using structural markup and the DOM continues with Using Lists for DHTML Menus. Dave Lindquist uses identical XHTML markup combined with two different sets of JavaScript and CSS to implement both a set of dropdown menus and an expandable, tree style menu. The code is standards compliant and remarkably lightweight (menuExpandable.js weighs in at less than 20 lines) and fully accessible thanks to intelligent use of the accesskey attribute.

More examples of this new-wave style of DHTML can be found in youngpup’s Labels.js: A Re-Introduction to DHTML and Stuart’s excellent aqTree2.

This is Sexy DHTML by Simon Willison, posted on 2nd November 2002.

Next: Joe Gillespie does CSS

Previous: Excellent introduction to XSLT

Previously hosted at