News for hackers. Stuff that matters.
Re:Ask YC: html select = javascript dropdown ? by izak30 on Wednesday June 11, 2008 @09:27AM (#214828)
Using jQuery, you could get each option from the Select, and make it a div/span (or more commonly, a UL for drop downs)

for this example include jquery and superfish libraries

//Insert a new node under select id $("#SelectId").after("<ul id='newUl'></ul>"); $("#SelectId").hide(); $("#SelectId option").each(function(){$("#newUl").append("<li>"+this.html()+"</li>");});

//Now you have made a UL from a Select box, so use something like superfish to make it a dropdown $("#newUl").superfish();

There are no comments on this comment yet.