It's called selectmenu, you can check it out here:
http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html
The component is designed to replace the functionality of a native
form select element, allowing for enhanced skinning and behavior. You
call it on a select element, like this:
$('select').selectmenu();
The original select element will remain in the page (whether visible
or hidden), and the new selectmenu component will control it. This of
course allows for easy form submission as if this plugin was never
there.
We've got a great deal of functionality already in place, such as:
- keyboard accessibility (arrowing, selecting when both open and closed)
- ARIA support - (tested on NVDA - seems to work well)
- different menu types (popup vs. dropdown)
- widget factory driven (incomplete, but it's a start)
- full theming support
- form label association (click label to focus)
- formatting of options: ability to split option text into better
formatted elements in the UI component. This feature could really use
some feedback, especially on the technical implementation side.
We've filled out the wiki page with more info and ideas:
https://jqueryui.pbworks.com/Selectmenu
We'd appreciate any feedback on the functionality and especially the
code, which we realize can be improved to be in line with our coding
practices.
Also, we'll be posting a lab article on our site about this plugin in
the near future.
Thanks for checking it out. Hopefully this plugin can be reworked and
shuffled into an upcoming release!
-Scott
On 6/11/09 7:46 PM, Scott Jehl wrote:
> Hi all,
> Over at Filament, we've worked out a new UI plugin and I just
> committed it into labs.
>
> It's called selectmenu, you can check it out here:
> http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html
>
> The component is designed to replace the functionality of a native
> form select element, allowing for enhanced skinning and behavior. You
> call it on a select element, like this:
> $('select').selectmenu();
>
> The original select element will remain in the page (whether visible
> or hidden), and the new selectmenu component will control it. This of
> course allows for easy form submission as if this plugin was never
> there.
very nice! I was wondering why you use a bunch of spans, instead of an
ul and li elements? Using a list feels more natural (and semantically
correct).
Wichert.
--
Wichert Akkerman <wic...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
Hi,
thx for your advices. I have looked yesterday into the menu-codes. I
think I will work on the menu-plugin by paul. It seems to be very well
designed.
This means I have to make it themeroller compatible and add
the other features from the fg.menu and the wiki (Aria, keyboard and
so on). Due to the fact, that the positionTo helper is in an early
stage, i would still use the old position-method, included in the menu-
branch and switch to the new helper-method as soon as possible.
About the closeOthers/CloseOnDocumentClick implementations in menu-
and similiar widgets.
I think this kind of behavioral pattern and its implementation needs
to be more clear. In fact in real application-widgets: a widget doesn
´t close because you activate another widget of the same type or
because you click somewhere else. It closes itself, because the user
moves the focus away from the widget.
The implementation is far simpler, than seen in fg.menu, ui.selectmenu
or paul´s ui.menu. It simply looks like this:
var self = this;
this.element
.bind('focusin', function(){
clearTimeout(self.killTimer);
})
.bind('focusout', function(){
self.killTimer = setTimeout(self.close, 1);
});
(This code needs Jörn´s focusin/focusout cross-browser implementation)