## Function(event, treeId, treeNodes, targetNode, moveType)setting.callback.onDrop

### Overview[ depends on jquery.ztree.exedit js ]

Used to capture the drop event when drag-drop node.

If you set 'setting.callback.beforeDrop',and return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.

Default: null

### Function Parameter Descriptions

#### event js event Object

event Object

#### treeId String

zTree unique identifier: treeId, easy for users to control.

#### treeNodes Array(JSON)

A collection of the nodes which has been dragged

#### targetNode JSON

JSON data object of the target node which treeNodes are drag-dropped.

If the treeNodes will be root node, the targetNode = null

#### moveType String

the relative position of move to the target node

"inner": will be child of targetNode

"prev": will be sibling node, and be in front of targetNode

"next": will be sibling node, and be behind targetNode

### Examples of setting & function

#### 1. When drag-drop nodes complete, alert the number of dragged nodes and info about targetNode.

    function zTreeOnDrop(event, treeId, treeNodes, targetNode, moveType) {
        alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
    };
    var setting = {
    	callback: {
    		onDrop: zTreeOnDrop
    	}
    };
    ......