This is a specific solution, but it should work for your needs ... (using jQuery) ...:
Summary Create your own element similar to the element, copy the values ββfrom the <datalist> into it. Then bind 2 events for input: show / hide focus / blur. And add an event to each element similar to the element to pass the value on click () for input. This will be the save item that will be displayed when there is no <datalist> drop-down list. There is one tricky thing - fading is done by setTimeout, because the focusout (blur) event is fired before the click event ...
A screenshot taken so far: http://jsfiddle.net/xPx2Z/3/ :) / * xrome look-a-like dropdown * /
BTW: you cannot open "true" <select> and still be focus() ed in the input, so the solution with the <select> element is not good. So I updated the answer a bit :)
source share