Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I made a simple example for you <a href="http://jsfiddle.net/Lyvfz/13/" rel="nofollow">here</a><br> Basically, it creates a div over your jstree's one so that it is disabled from user interactions.<br> I guess you can make it visually better, but i think this gives you the idea.<br> I also checked that there is no strigth way to disable a jstree, even if it could be usefull.<br> Maybe you'd want to ask the dev in google group... </p> <p>HTML Code: </p> <pre><code>&lt;button id="disable"&gt;Disable&lt;/button&gt; &lt;button id="enable"&gt;Enable&lt;/button&gt; &lt;div id="jstree-wrapper"&gt; &lt;div id="demo" style="height:100px;"&gt; &lt;ul&gt; &lt;li id="node_1_id"&gt; &lt;a&gt;Root node 1&lt;/a&gt; &lt;ul&gt; &lt;li id="child_node_1_id"&gt; &lt;a&gt;Child node 1&lt;/a&gt; &lt;/li&gt; &lt;li id="child_node_2_id"&gt; &lt;a&gt;Child node 2&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt;&lt;a&gt;Team A's Projects&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a&gt;Iteration 1&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a&gt;Story A&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a&gt;Story B&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a&gt;Story C&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a&gt;Iteration 2&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a&gt;Story D&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="disabler"&gt;&lt;/div&gt; &lt;/div&gt;​ </code></pre> <p>CSS code:</p> <pre><code>#jstree-wrapper { position: relative; } #disabler { position: absolute; top: 0px; left: 0px; background-color: black; opacity: 0.5; }​ </code></pre> <p>JS Code:</p> <pre><code>$(document).ready(function() { $("#demo").jstree(); $("#disable").on("click", function() { $("#disabler").css("width", $("#demo").width()); $("#disabler").css("height", $("#demo").height()); }); $("#enable").on("click", function() { $("#disabler").css("width", "0px"); $("#disabler").css("height", "0px"); }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload