title: jstree delete_node() is not deleting
body: <p>I've been cobbling together a function to put together a custom context menu for different nodes. Well, so far so good on getting different label to show up for clicks on folders or files, but not so much on actually deleting them. </p>
  
  <p>Have a look. I had to ... do a little bit of a hacky workaround because I couldn't get the node.hasClass('jstree-open') yada yada to work right, but this is generally working up to the bit that's supposed to do the deleting</p>
  
  <pre><code>function customMenu(node) {
              //Show a different label for renaming files and folders
              var ID = $(node).attr('id');
              if (ID == "j1_1") {
                  return items = {}; //no context menu for the root
              }
              var $mynode = $('#' + ID);
              var renameLabel;
              var deleteLabel;
              var folder = false;
              if ($mynode.hasClass("jstree-closed") || $mynode.hasClass("jstree-open")) { //If node is a folder
                  renameLabel = "Rename Folder";
                  deleteLabel = "Delete Folder";
                  folder = true;
              }
              else {
                  renameLabel = "Rename File";
                  deleteLabel = "Delete File";
              }
              var items = {
                  "rename" : {
                      "label" : renameLabel, 
                      "action": function (obj) {
                           //nothing here yet.
                      }
                  },
                  "delete" : {
                      "label" : deleteLabel,
                      "action": function (obj) {
                          //tree.delete_node($(node));
                          //this.remove(obj);
                          //$('#treeView').jstree('remove', $(node));
                          //nothing is working.
                      }
                  }
              };
  
              return items;
          }
  </code></pre>
  
  <p>I've put together a fiddle for your convenience: <a href="http://jsfiddle.net/dpzy8xjb/" rel="noreferrer">http://jsfiddle.net/dpzy8xjb/</a>
  I don't think it really needs to be said that I'm not super experienced with jQuery or dealing with third party APIs, so... Be gentle. </p>