You can attach event listeners with the tree.events.on() method:
tree.events.on("itemClick", function(id, e){
console.log("The item with the id "+ id +" was clicked.");
});
note
The names of events are case-insensitive.
Related sample: Tree. Events
Detaching event listenersâTo detach events, use tree.events.detach():
tree.events.on("itemClick", function(id, e){
console.log("The item with the id "+ id +" was clicked.");
});
tree.events.detach("itemClick");
Calling eventsâ
To call events, use tree.events.fire():
tree.events.fire("name",args);
// where args is an array of arguments
The list of eventsâ
The full list of events is available in the related API section.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4