1

I'm using the jsTree jQuery plugin and I want to process the Node data after double click. For single click, the code is simple, as there is the data parameter:

.bind("select_node.jstree", function(e, data) {
     if(jQuery.data(data.rslt.obj[0], "href")) {
         window.location=jQuery.data(data.rslt.obj[0], "href");
     } else {
         alert("No href defined for this element");
     }
})

But how to access the same data in case of double click?

.bind("dblclick.jstree", function(e) {
    ???
})
Dave
  • 43
  • 3
  • 5

1 Answers1

2

This Works

To access the same data in case of double click

.bind("dblclick.jstree", function(e) {

var data= $(treeID).jstree().get_selected(true);

})
cr7 aj7
  • 101
  • 1
  • 6