jquery - Detecting node is a folder with dynatree -
how detect if clicked node folder ?
i wish find out if clicked node folder modify right-click behaviour (if not folder => something).
once have node, can test node.data.isfolder
.
in dynatree event handler straightforward:
for example
onclick: function(node, event) { if(node.geteventtargettype(event) === "title" && node.data.isfolder){ [...] // handle click event return false;// prevent default processing } }
from inside custom handler might first have find node target element:
var node = $.ui.dynatree.getnode(el)
Comments
Post a Comment