[jQuery] How can I add a new Treeview method like a .reload([param])?
Hello Jörn Zaefferer... or some else...
I wish to add a new method like a reload or refresh.
Because I wish add a new "side tree control" named "Order by text".
e.g.:
var tree;
jQuery(document).ready(function(){
tree = jQuery("#browser").treeview({
collapsed: true,
animated: "medium",
control:"#sidetreecontrol",
persist: "location",
url:"../categoria"
});
});
And a new botton, I can call that a method like that:
tree.reload(url:"../categoria?orderbytext=1");
The question is, how can I extend the treeview to add a new method?
I already try that:
jQuery("#browser").empty();
jQuery("#browser").treeview({
collapsed: true,
animated: "medium",
control:"#sidetreecontrol",
persist: "location",
url:"../categoria"
});
But don't work very well, because the plus icon expand the tree and
close in same time.
Can help me please?