jQuery UI Widgets › Forums › General Discussions › Navigation › Tree › Join Two jqxTree
Tagged: angular tree, append merged tree, bootstrap tree, javascript tree, jquery tree, jqwidgets tree, jqxtree
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 9 years, 11 months ago.
-
AuthorJoin Two jqxTree Posts
-
Dear JQXWidget Team,
I have two jqxTree objects and they are created from HTML as follows
Tree 1
<div id='jqxTree1' style='visibility: hidden; float: left; margin-left: 20px;'> <ul> <li>Root</li> </ul> </div>and I created the tree as
$('#jqxTree1').jqxTree({ height: '450px', width: '300px'});
and Tree 2<div id='jqxTree2' style='visibility: hidden; float: left; margin-left: 20px;'> <ul> <li>Child1</li> <li>Child2</li> <li>Child3</li> </ul> </div>and I created the tree as
$('#jqxTree2').jqxTree({ height: '450px', width: '300px'});Now if I want to append Tree 2 into Tree 1 how I can do that using javascript only ? I need to do this programmatically and hence I cannot do it in HTML. Please note I have to create both of the tree from HTML code and join them using javascript.
please help me..
thanks and regards
Sumit RoyHello SumitRoy,
Maybe I do not understand you correct. But this scenario is strange. (You could get html elements from Tree2 and append to suitable place in Tree1)
Please, take a look at this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/dragdrop.htm?arctic
Unfortunately is not possible to append directly one Tree to another.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comDear JQX,
What I want to say is I have both the trees Tree 1 and Tree 2 and both are invisible when they are initialized at page load.
Now what I want is to call some javascript code that will merge the trees and create the following tree structure<div id='jqxTree1' style='visibility: hidden; float: left; margin-left: 20px;'> <ul> <li>Root <ul> <li>Child1</li> <li>Child2</li> <li>Child3</li> </ul> </li> </ul> </div>Hello SumitRoy,
Please, take a look at this example:
http://jsfiddle.net/txhi/sk1rwz0g/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.