hi everybody,
i have a problem. how can i get the position of item. like item.offset.top and item.offset.left.
normal document object can get position as below. i wander if item of dhtmlxtree can.
var docObj1 = $('#books').offset();//api of jquery
alert(docObj1.left);
alert(docObj1.top);
due to the requirement that i want to draw a line from one item to another item of another tree. so i need to get the position data of items in the first place. i dont know whether dhtmlxtree has other good methods more convenient to implement the requirement.
an error occured: “tree._idpull.books is null or is not an object.”
books exists definitely.
my dhtmlxtree version is 1.3.
my problem is about version?
Is “books” item loaded in tree ? If you need to get item position right after xml loading, you need to call this function from the loading end handler:
tree.loadXML(“tree.xml”,doAfterLoading);
function doAfterLoading(){
var obj = tree._idpull[“books”].htmlNode;
…
});
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan