title: how to open/close nodes on double/single click in jsTree
body: <p>how can I <strong>open/close</strong> nodes on double or single <strong>click</strong> of the <strong>node name</strong>? Like it works here <a href="http://luban.danse.us/jazzclub/javascripts/jquery/jsTree/reference/_examples/5_others.html" rel="noreferrer">the first tree sample</a> - but there is used jsTree 0.9.8</p>
  
  <ul>
  <li>Using <a href="http://www.jstree.com/" rel="noreferrer">jsTree 1.0rc2</a> </li>
  </ul>
  
  <p>-</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt; dashboard&lt;/title&gt;
  
  &lt;script type="text/javascript" src="_lib/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="jquery.jstree.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="_lib/jstreegrid.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  //&lt;![CDATA[
  
  $(document).ready(function(){
  
  var data = [{
         data: "basics",
         attr: {SOF: "&lt;a href=\"http://www.w3schools.com\"&gt;Visit W3Schools.com!&lt;/a&gt;"},  
          children: [
           {data: "login", attr: {run: "run"},
             children: [                   
             {data: "login", attr: {}}
            ]
           } ,
           {data: "Academic Year", attr: {run: "run"},
            children: [                   
             {data: "login", attr: {}},
             {data: "Academic Year",  attr: {filter: "mini", SOF: "&lt;a href=\"http://www.w3schools.com\"&gt;Visit W3Schools.com!&lt;/a&gt;"}}
            ]
  
           }
          ]
        }];
  $("div#jstree").jstree({
  plugins: ["themes","json_data","grid","dnd"],
  json_data: {data: data},
  grid: {
          columns: [
            {width: 220, header: "Group"},
                          {cellClass: "col2", value: "run", width: 40, header: "run"},
                          {cellClass: "col3", value: "filter", width: 40, header: "filter"},
                          {cellClass: "col4", value: "SOF", width: 450, header: "SOF"}
                  ]
              },
  dnd: {
  drop_finish : function () {
  },
  drag_finish : function () {
  },
  drag_check : function (data) {
  return {
  after : true,
  before : true,
  inside : true
  };
  }
  }
  });
  });
  //]]&gt;
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="jstree"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>