DEV Community

loading...

Discussion on: What Did You Learn This Week --March 27?

Collapse
marklchaves profile image
mark l chaves

Happy birthday week, @waylonwalker !

This week (or late last week), I worked on something that I thought was an interesting requirement. I've seen it come up twice now. There were no takers. So, I thought I'd give it a whirl.

The requirement was to have top-level menu items jump to an accordion further down the page and open the corresponding accordion item. I call it a "remote control" accordion.

Has anyone else seen this requirement? Anyway, here's my solution in plain JavaScript.

codepen.io/marklchaves/pen/oNXyNLQ

Comments are welcome ;-)

Collapse
waylonwalker profile image