[jQuery] [treeview] newbie...
What I'm trying to accomplish with the code below is populate nodes
dynamically.
Thus when a user clicks on a node, I call the function below. The
problem is that when the tree is rendered the + and - images to the
left of the node does not appear for the new children. Am I doing
something wrong in the code below?
Thanks in advance for any help.
function showNLA(sid) {
var children;
$.get(setToNewPage("main.aspx")+"?tree=1&sid="+sid, function(data){
children = data;
$("#"+sid+"_c").html(data);
});
$("#tree").treeview({ add: children });
}
The data is retrieved using an ajax get in the following format:
<li id='448937'><a href='#'
onclick="showNLA('448937')">312A2828P6</a></li>