Collapsible Menus
02:22 PM - Dec 28, 2003
Many have asked me about the code and markup behind the collapsible navigation links in the right-side column, the most recent inquiry in a comment from my previous post. I usually just refer people to my Colophon’s Other Features section where I’ve mentioned this with some links but I thought I’d mention something here, too. [Designing with Web Standards, by Jeffrey Zeldman]
I’ve used DOM-based scripting to implement the show/hide navigation with a combination of JavaScript and CSS. The JavaScript is from Chapter 15 of Jeffrey Zeldman’s top-notch book, Designing with Web Standards. I wanted the collapsible navigation to be as widely accessible as possible, in addition to not being complex or difficult to implement or maintain. More recently I’ve also tweaked the markup a bit to help with keyboard navigation.
I’ve mentioned Designing with Web Standards more than a few times here for a variety of reasons, so it’s no surprise that I highly recommend Jeffrey Zeldman’s book. You can purchase it online via Amazon.com and elsewhere and read more at the book’s companion site.
[Home: Mobile · Main]