简体   繁体   中英

Dynatree extra attribute

I'm using dynatree and generating my dynatree out of json. Is it possible that I've an extra attribute (data_key) in my fields so I can work with the dynatree with my PHP as well? I want a hover effect on the icons from the dynatree, the pop-up that is coming up, needs to have some data of the "hovered" node.

Somebody an answer?

Custom properties that you add to the JSON child array will be copied to node.data. So if you pass [{"title": "node 1", "myAttr": "foo"}, ...] you can accesss it like node.data.myAttr .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM