News for hackers. Stuff that matters.
Re:Ask YC: html select = javascript dropdown ? by simonw on Wednesday June 11, 2008 @03:30AM (#214685)
DHTML dropdowns need to be created using HTML markup - divs and spans would work, but an unordered list makes a bit more structural sense.

You'll have to write code that creates an empty list, finds your select box, loops through all of the options within it, creates a list item with the same text in it as each of those options, appends the list item to the empty list and then appends that list in to the DOM. Then you can trigger an existing dropdown library against your newly created list (and remove the select box from the DOM).

There are no comments on this comment yet.