jQuery EasyUI tree menu - drop tree menu control

When the tree (Tree) plug-in an application, drag and drop (drag) and place (drop) functional requirements allow users to change the position of the nodes. Enable drag (drag) and place (drop) operation, all you need to do is put the tree (Tree) widget 'dnd' property is set to true.

Create tree menu (Tree)

	$ ( '# Tt'). Tree ({
		dnd: true,
		url: 'tree_data.json'
	});

When an operation is placed on a tree node, 'onDrop' event will be triggered, or you should do some more operations, such as saving the state of the node to the remote server, and so on.

	onDrop: function (targetNode, source, point) {
        var targetId = $ (target) .tree ( 'getNode', targetNode) .id;
        $ .ajax ({
            url: '/en.',
            type: 'post',
            dataType: 'json',
            data: {
                id: source.id,
                targetId: targetId,
                point: point
            }
        });
    }

Download jQuery EasyUI examples

jeasyui-tree-tree5.zip