Widget API
Widget API
Hi,
I'm relatively new to jQuery (but not to javascript), and I'm trying
to grok the widget API. I've gone through the source and followed a
tutorial [1], but I have a few questions remaining. I'm following the
1.6rc4 release, so part of the issue for me might be that the
documentation and tutorials are different than the current [evolving]
best practices.
Out of curiosity, what was the design rationale behind having widget
methods callable via a string (e.g. "$.dialog('show')" as opposed to
"$.dialog.show()")?
Is there a roadmap, or informal API discussion, that explains how
$.widget works in 1.6 in more detail? Or if not, are any of the
existing widgets a particularly good example to follow to create third-
party widgets? The getters and setters in particular seem unfinished,
so I'm not sure if the code I'm looking at is intended to be complete
or not.
Thanks for your help.
[1]: http://youngisrael-stl.org/wordpress/2008/08/03/jquery-ui-widgets/