My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 423: Get DOM node by ID from dynaTree Node
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Apr 2013


 
Reported by binita.b...@gmail.com, Apr 23, 2013
Hi,

I am using dynaTree 1.2.4 with jQuery 1.9. 

I need to get the the equivalent DOM/jQueryNode based on DOM Element's ID. I can see that dynaTree doesnt add any DOM id to the dynaTreeNode. Essentially, I want to do reverse of what this dynaTree API achieves :

$.ui.dynatree.getNode(<domElement identified by id>)


Is it possible to do so ?

Thanks
Binita
Apr 23, 2013
Project Member #1 moo...@wwwendt.de
Are you looking for  the 'generateIds' option?
Status: Waiting
Apr 23, 2013
#2 binita.b...@gmail.com
What I mean is that , the HTML associated to each dynaTreeNode should have a 'id' associated. Currently, its putting all the attributes into the HTML "data" attribute. But, to uniquely identify a node in DOM/jQuery, a "id" attribute is required. 

I should be able to do something like :

in plain DOM :
        document.getElementById(<dynaTreeNode's Id>) 
 or its jQuery equivalent :
       $("<dynaTreeNode's Id>")


Not sure about the 'generateIds' option though.

Thanks
Apr 23, 2013
Project Member #3 moo...@wwwendt.de
I think setting `generateIds: true` should solve it
Status: Done
Apr 24, 2013
#4 binita.b...@gmail.com
Adding generateIds property to the treeNode didnt work :(. 
Apr 24, 2013
Project Member #5 moo...@wwwendt.de
it's an option you can set when initializing the tree, you can search the docs for it...
May 2, 2014
Project Member #6 moo...@wwwendt.de
Cleanup Scrumboard
Labels: Milestone-Release2.0

Powered by Google Project Hosting