jsuen
Member
Posts: 10
Registered: 12/19/2006
Member Is Offline
|
| posted on 12/19/2006 at 04:37 PM |
|
|
Multiple events when Tree branch is selected
Hi,
I have bought the Pro version of the Tigra Tree Menus, and have managed to get it generating the tree hierarchy I need fairly easily.
My query now is that I'd like for branches that are selected to not only open up any child leaf nodes, but also to fire off another event (i.e. call
a Javascript function).
When I override the OpenItemHandler per item, i.e. {'hs':'OnItemOpenHandler', 'link': 'http://www.google.com'} - this can only call the
Javascript (and does not open the branch anymore).
Does anyone know of another way to add an event for a multiple chain?
Thanks,
Jon
|
|
|
jsuen
Member
Posts: 10
Registered: 12/19/2006
Member Is Offline
|
| posted on 12/19/2006 at 04:53 PM |
|
|
For anyone who's interested, this is probably best done in the tree_tpl.js (or similar file):
'onItemOpen':'open_test', // on item open event handler
'onItemClose':'close_test', // on item close event handler
As mentioned in the documentation, you can pass a parameter (or call other Javascript functions) into your defined open_test or close_test methods:
function open_test (o_item) {
testAlert(o_item.a_config[2]['link']);
// here you can insert your item open event handler
return true;
}
Jon
|
|
|
|