开发者

alternatives to the ordinary select dropdown (styling)

开发者 https://www.devze.com 2023-03-03 18:31 出处:网络
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 input

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:

alternatives to the ordinary select dropdown (styling)

0

精彩评论

暂无评论...
验证码 换一张
取 消