Implementation of the menu widget
Hey everyone,
I've invested quite a few days now into the implementation of both the menu widget and the new positionAround method.
Please feel free to play around with the source and the visual tests at branches/experimental/ .
Also, I've updated the menu page in the wiki - Interaction Design team members, please review it and
comment - I'd like to hear your thoughts.
One of the most important changes is the following:
1) Previous way the widget worked: $(<ul>).menu() creates a menu using the selected markup and shows it
2) New way the widget works: $(elem).menu({ items: <ul> }) attaches a menu to the given element, as context menu, dropdown or statically rendered, uses the markup in options.items.
There's a fundamental difference between these two - the first is not a widget, but a one time action. It could even
be implemented as $.fn function, because it has no states. The second is a true widget, with attached behaviour.
The first limits the initial usability - the developer needs to implement events himself, he also needs to position the new menu.
Thanks,
Paul<br clear="all">
--
Paul Bakaus
UI Architect
--
<a href="http://paulbakaus.com">http://paulbakaus.com</a>
<a href="http://www.linkedin.com/in/paulbakaus">http://www.linkedin.com/in/paulbakaus</a>