开发者

how to traverse a wijmo tree

I was wondering if anyone has ever worked with wijmo compo开发者_开发知识库nents? What i am trying to do is to start from the root element of a wijmo tree, and traverse all the elements and return them as a tree structure.

thank you, krizD


The best way to do it would be to traverse the DOM using a recursive function on the li tags. Then turn it into JSON as a "tree object".

You can get the root level elements to begin your recursive function like so:

$("#tree").wijtree();

$("#tree > ul > li").each(function(){ yourRecursiveFunc(node) });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜