Christian Heilmann

Panel Bar or Accordeon Menu using DOMscripting and CSS

Thursday, February 2nd, 2006 at 10:07 pm

A friend of mine asked for a menu like the Outlook Panel in CSS and JavaScript as a proof of concept. I took on the challenge and quickly put together this example of a DOMscripting powered panel menu . It functions the same way – only one section can be open at a time – and should be rather self-explanatory. For a change I am not using off-left to hide the sections but plain old display block and none inside the script, which has the welcome side effect that you can use it with a keyboard without having to tab through the invisible links!

Features:

  • Fully contained unobtrusive JavaScript
  • Option to style JavaScript and non-JavaScript menu independently
  • Option to have predefined open section

I hope it is helpful for some of you, and I appreciate any feedback / bug issues.

Share on Mastodon (needs instance)

Share on Twitter

Newsletter

Check out the Dev Digest Newsletter I write every week for WeAreDevelopers. Latest issues:

Dev Digest 146: 🥱 React fatigue 📊 Query anything with SQL 🧠 AI News

Why it may not be needed to learn React, why Deepfake masks will be a big problem and your spirit animal in body fat! 

Dev Digest 147: Free Copilot! Panel: AI and devs! RTO is bad! Pi plays!

Free Copilot! Experts discuss what AI means for devs. Don't trust containers. Mandated RTO means brain drain. And Pi plays Pokemon!

Dev Digest 148: Behind the scenes of Dev Digest & end of the year reports.

In 50 editions of Dev Digest we gave you 2081 resources. Join us in looking back and learn about all the trends this year.

Dev Digest 149: Wordpress break, VW tracking leak, ChatGPT vs Google.

Slowly starting 2025 we look at ChatGPT vs Google, Copilot vs. Cursor and the state of AI crawlers to replace web search…

Dev Digest 150: Shifting manually to AI.

Manual coding is becoming less of a skill. How can we ensure the quality of generated code? Also, unpacking an APK can get you an AI model.

My other work: