[jQuery] [TreeView] - How to collapse/expand with a link?
I have a UL list which i apply the treeview plugin. So far so good.
The treeview control works like it should, but I need to be able to
assign a link to collapse the tree. Any link without being inside a
treecontrol div. The treecontrol assigns actions according to order of
appearing links.
First link expands, next collapses and the third and last one toggles.
I need to be able to assign the collapse action to a link without
using treecontrol.
I imagine it would go something like this...
$("a.collapse").click(function() {
$("#tree").doWhatever I need to do to collapse the tree.
});
I've looked at the demos, the code, the documentation (I can see the
properties which I can set when i apply the treeview to the list, but
can't see how I can call an action), tried searching.
I'm a beginner, so I can't figure out how or if it's possible.
Here's the plugin: http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
Regards, Victor