Options

When initalising a new tree it is possible to pass in a number of options which change the default functionality. It is also possbile to change these options once a tree has finished initalising. This demo shows the various options which are available, explained in more detail on the options documentation page
Options
Allow Activation
Enable Dnd
Disable Icons
No ordering Ordered Ordered Folder First
Sliding Time
Minimum Open Level
   <div class="box" style="float:left; width:335px; margin-left:30px">
       <div class="box_title">Options</div>
       <div class="box_content">
           <input type="checkbox" id="allowActivation" checked="checked" onchange="optionChange()" />Allow Activation
           <br />
           <input type="checkbox" id="enableDnd" checked="checked" onchange="optionChange()" />Enable Dnd
           <br />
           <input type="checkbox" id="disableIcons" onchange="optionChange()" />Disable Icons
           <br />
           <input type="radio" name="ordering" onchange="optionChange()" checked="checked" value="" /> No ordering
           <input type="radio" name="ordering" onchange="optionChange()" value="Ordered" /> Ordered
           <input type="radio" name="ordering" onchange="optionChange()" value="OrderedFolder" />Ordered Folder First
           <br />
           <input type="text" value="100" style="width:50px" id="slidingTime" onchange="optionChange()" /> Sliding Time
           <br />
           <input type="text" value="0" style="width:50px" id="minOpenLevels" onchange="optionChange()" /> Minimum Open Level
       </div>
   </div>
   <script>
       var easyTree = $('#demo1_menu').easytree();

       function optionChange() {
           easyTree.options.allowActivate = $('#allowActivation')[0].checked;
           easyTree.options.enableDnd = $('#enableDnd')[0].checked;
           easyTree.options.disableIcons = $('#disableIcons')[0].checked;
           easyTree.options.ordering = $("input[name='ordering']:checked").val()
           easyTree.options.slidingTime = $('#slidingTime').val();
           easyTree.options.minOpenLevels = $('#minOpenLevels').val();

           easyTree.rebuildTree();
       }
   </script>