思路话语

。Arlen:思想有多远你就能走多远...

好用且易用的simpletree plugin

http://news.kg/wp-content/uploads/tree/

BSD协议。好用且易用。

 

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)

posted on 2009-03-07 16:45  Arlen  阅读(280)  评论(0)    收藏  举报

导航