Ubiquity and consistency

  1. Create your own dropdown widget using JavaScript (working with divs and spans).
  1. Make that functionality available using the simplest possible technology.
  2. Enhance!
  1. Use a select element.
  2. Use JavaScript to replace that native element with a widget of your own devising.
  1. Use an a element with an href attribute.
  2. Use JavaScript to intercept that click, add a nice transition, and pull in the content using Ajax.
  1. Build an under-engineered solution — one that might not offer you much control, but that works for everyone.
  2. Layer on a more over-engineered solution — one that might not work for everyone, but that offers you more control.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jeremy Keith

Jeremy Keith

A web developer and author living and working in Brighton, England. Everything I post on Medium is a copy — the originals are on my own website, adactio.com