I'm trying to make new select-boxes with a custom styling instead of the boring standard one using jquery. What it does is that i开发者_Go百科s rewrites the " + " into lists.
Quick example:
<select class="changeSelect">
<option value="0" selected="selected">Choose now</option>
<option value="1">aaaaaaaaa</option>
<option value="2">bbbbbbbbb</option>
<option value="3">ccccccccc</option>
</select>
Becomes into:
<ul>
<li class="first">Choose now</li>
<li>aaaaaaaaa</li>
<li>bbbbbbbbb</li>
<li class="last">ccccccccc</li>
</ul>
Now what I need for it is to jump to the list options when I type the first letter. So if I fx type "b" when the list is active, it will jump to the list "bbbbbbb" (and add a class, highlight or something other..)
But how do I do this?
use this CSS
try this code using pure javascript
autoComplete
How to Use it
精彩评论