diff --git a/_includes/js/tree.html b/_includes/js/tree.html
index c4967622f..e33f08c7f 100644
--- a/_includes/js/tree.html
+++ b/_includes/js/tree.html
@@ -201,50 +201,49 @@
selected.fu.tree |
- This event fires when a user selects one or more items. Returns an object containing {info: data} . data represents an array of selected items. |
+ Fires when a user selects an item or folder. Returns an object containing an array of the selected items' jQuery data and the jQuery data of the triggering item. { selected: [array], target: [object] } |
deselected.fu.tree |
- This event fires when a user deselects one or more items. Returns an object containing {info: data} . data represents an array of selected items. |
+ Fires when a user deselects an item or folder. Returns an object containing an array of the selected items' jQuery data and the jQuery data of the triggering item. { selected: [array], target: [object] } |
loaded.fu.tree |
- This event fires when sub-content has been is loaded. |
+ Fires when sub-content has been is loaded. Returns the jQuery element of the folder loaded. |
updated.fu.tree |
- This event fires after selected.fu.tree , deselected.fu.tree events. Returns an object containing selected items , curent item and event type. |
+ Fires after selected.fu.tree and deselected.fu.tree events. Returns an object containing an array of selected items' jQuery data, the triggering jQuery element and the event type. { selected: [array], item: [object], eventType: [string] } |
disclosedFolder.fu.tree |
- This event fires when a user opens a folder. Returns an object containing folder information. |
+ Fires when a user opens a folder. Returns an object containing the jQuery data of the opened folder. |
closed.fu.tree |
- This event fires when a user closes a folder. Returns an object containing folder information. |
+ Fires when a user closes a folder. Returns an object containing the jQuery data of the closed folder. |
- closeAll.fu.tree |
- This event fires when all folders have finished closing |
+ closedAll.fu.tree |
+ Fires when all folders have finished closing. Returns an object containing an array of closed folders' jQuery data and the tree's jQuery element. The length of reportedClosed will provide the number of folders closed. { reportedClosed: [array], tree: [$element] } |
-
disclosedVisible.fu.tree |
- This event fires when all visible folders have disclosed. Returns an object containing {tree: $el, reportedOpened: N} |
+ Fires when all visible folders have disclosed/opened. Returns an object containing an array of disclosed folders' jQuery data and the tree's jQuery element. The length of reportedOpened will provide the number of folders opened. { reportedOpened: [array], tree: [$element] } |
disclosedAll.fu.tree |
- This event fires when all folders have disclosed. It will not fire if tree stops disclosing due to hitting discloserLimit cap. Returns an object containing {tree: $el, disclosures: N} |
+ Fires when all folders have disclosed. It will not fire if tree stops disclosing due to hitting discloserLimit cap. Returns an object containing { disclosures: [number], tree: [$element] } |
- All tree events are fired on the .tree
classed element.
+ All tree events are triggered from the .tree
classed element.
{% highlight js %}
-$('#myTree').on('loaded.fu.tree', function () {
- // do something
+$('#myTree').on('selected.fu.tree', function (event, data) {
+ // do something with data: { selected: [array], target: [object] }
})
{% endhighlight %}