Add your callbacks!

Add your callbacks!

Hi devs,
the following plugins still don't have any callbacks people can use to track what your plugin is doing right now:
<ul><li>ui.tree.js</li><li>ui.toolbar.js</li><li>ui.tabs.js</li><li>ui.menu.js</li>
</ul>I have updated the developer guide to reflect the recent changes for callbacks (John added a new triggerHandler method to jQuery), please look here how to implement it: <a href="http://docs.jquery.com/UI_Developer_Guide#Callbacks">
http://docs.jquery.com/UI_Developer_Guide#Callbacks</a> . Or if you prefer, look at the mouse interaction implementations (i.e draggables), they're all prepared already.
Please make sure to add as many sense-making callbacks as possible, and keep their names short but descriptive.
So as an example, for draggables, I actually have the following three callbacks:
<div style="margin-left: 40px;">-dragstart
-dragstop
-drag
</div>
If the user passes functions to these callbacks in the options he will /not/ use the drag prefix, so something like this:
<div style="margin-left: 40px;">$(el).draggable({ start: function() {}, stop: function() {}, drag: function() {} });
</div>
However, you trigger the functions like this (in case of dragstart):
<div style="margin-left: 40px;">
$(this.element).triggerHandler("dragstart", [e, uiObj], this.options.start);
</div>
Please answer to this thread if you have any questions. Thank you!
Paul<br clear="all">
--
--
Paul Bakaus