title: How do I get the id of the selected node in jsTree?
body: <p>How can I get the id of the selected node in a <a href="http://www.jstree.com/demo/open_close" rel="noreferrer">jsTree</a>?</p>
  
  <pre><code>function createNewNode() {
    alert('test');
    var tree = $.tree.reference("#basic_html");
    selectedNodeId = xxxxxxxxx; //insert instruction to get id here
    tree.create({ data : "New Node Name" }, selectedNodeId);
  }
  </code></pre>