Using jsTree, when adding a node to my tree using the create_node function, I am attempting to add a callback function, as per https://github.com/vakata/jstree/blob/v.1.0/dist/jstree.js#L3549 .
However, it does not seem to execute, as illustrated here–> http://jsfiddle.net/thapar/e3nMg/ when Add Root Item is clicked (expecting console.log() to say “hi”, in the very least).
Any idea what I may be doing wrong?
Per the documentation at http://www.jstree.com/documentation/core, it looks like the ‘callback’ parameter to the
.create_nodefunction is used internally. It states that you should instead listen for the event. You can do so like this (assuming you’re using the same code as in your JSFiddle post: