alternatives to the ordinary select dropdown (styling)
how can it be possible to make a select dropdown where you can style the input as you like?
can you make something out of div elements? and how can you then "tab" between t开发者_如何学运维he inputs (ie. tabindex)?
The jQuery UI team is currently in the process of building out the official Selectbox code for the 1.9 release. In preparation, the Filament Group has done quite a bit of work to research, design, and code the project. It's currently available from them and working quite well, supporting ThemeRoller, icons, selectgroups, and more.
http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
I always suggest this great jQuery plugin: http://labs.abeautifulsite.net/projects/js/jquery/selectBox/
It generates nice standard HTML and also takes care about keyboard navigation. It has very good usability and is fully unobstrusive.
Generally an ordered or unordered list is used to simulate a drop down, but it takes a lot of code to reproduce the arrow, letter key and and tab key handling of a select-not to mention including the selected value(s) in a form submissionm.
Modern browsers allow styling of individual option elements, which may be more suited to your needs.
FogBugz, a stackoverflow product, uses a nice one:
精彩评论