How can I get the id of the selected node in a jsTree?
function createNewNode() { alert(\'test\'); var tree = $.tree.reference(\"#basic_html\"); select
In some cases and/or jstree versions this solution doesn't work.
$('#tree').jstree('get_selected').attr('id');
Instead of defined "id" I get nothing. What did the trick for me is:
$("#tree").jstree("get_selected").toString();