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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -