How can I get the id of the selected node in a jsTree?
function createNewNode() { alert(\'test\'); var tree = $.tree.reference(\"#basic_html\"); select
I was having problems getting the selected ids from a tree with MULTIPLE selections. This is the way I got them:
var checked_ids = []; $("#your-tree-id").jstree('get_selected').each(function(){ checked_ids.push($(this).data('id')); });