This is a migrated thread and some comments may be shown as answers.

Floating window beside the tree node

2 Answers 38 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Rishi
Top achievements
Rank 1
Rishi asked on 22 Apr 2010, 08:22 PM
Hi

I was working on having a floating div show up at the end of the tree node when the mouse hovers on the node,I was able to position the div based on the mouse position but, is there a way to get the length/width of the tree node, because I want to position my div to show up right at the point where the node ends not where my mouse is at?

I am doing all this on the client side.May be there is another way of doing this, if so please let me know.

Thanks

2 Answers, 1 is accepted

Sort by
0
Chip
Top achievements
Rank 1
answered on 23 Apr 2010, 03:24 PM
node.get_element() will return the tree node's DOM element and you can use jQuery to get its width - http://api.jquery.com/width/
0
Rishi
Top achievements
Rank 1
answered on 23 Apr 2010, 04:02 PM
Hi Chip

I tried it looks like the tree node element doesn't have a width() property on it, it does have the offsetLeft, offsetWidth but none of them are relevant to what I would require.
Tags
TreeView
Asked by
Rishi
Top achievements
Rank 1
Answers by
Chip
Top achievements
Rank 1
Rishi
Top achievements
Rank 1
Share this question
or