Simple Tree info
animate his parameter has a value "true/false" (enable/disable animation for expanding/collapsing menu items)
autoclose this parameter has a value "true/false" (enable/disable collapse of neighbor branches)
drag this parameter has a value "true/false". (enable/disable drag&drop )
(default: true)
speed animation speed (in ms or "slow", "normal", "fast") (only animate: true)
(default: "fast")
afterClick, afterDblClick this parameter defines callback function, which is executed after item clicked (set to "false" by default)
afterAjax this parameter defines callback function, which executes after ajax is loaded (set to "false" by default)
afterMove this parameter defines callback function, which executes after move node
(set to "false" by default)
function arguments (dd, ds, pos) :
dd - destination element (Drag Destination);
ds - dragged element (Drag Source);
pos - position (Node Position);
example:
$('#SomeTreeId').simpleTree({
afterMove:function(dd, ds, pos)
{
var msg = "position- "+pos+" \n"
+"drag destination ID- "+$(dd).attr("id")+"\n"
+" drag source ID- "+$(ds).attr("id");
alert(msg);
}
});
afterContextMenu (new) this parameter defines callback function, which is executed after item click the right mouse button (set to "false" by default)
docToFolderConvert this parameter has a value "true/false"
(convert leaf to folder)
(default: false)
AJAX upload method:
If there is a need in AJAX upload, then place UL with "ajax" class and tag LI with URL for a loadable item.
?xample:
<li><span class="text">Tree Node 1-1</span>
<ul class="ajax">
<li>{url:tree_load.php?tree_id=1}</li>
</ul>
</li>