CodeOath
← All challenges

Dropdown Menu

Medium
javascriptdom

Build a dropdown menu: a trigger button that reveals a list of options when clicked, closes when clicking outside it, and closes (showing the choice) when an option is selected.

Check your work against

  • Clicking the trigger button opens/closes the menu
  • Clicking anywhere outside the menu closes it
  • Clicking a menu item closes the menu and shows the selected value on the trigger button

There's no automated grading for UI challenges — self-check against this list, then compare with the solution preview.

Live preview