# Example 3 - Drag and drop

Let's add drag-and-drop support by setting the option dragAndDrop to true. You can now drag tree nodes to another position.

Other options:

- The option autoOpen is set to 0 to open the first level of nodes.

### html

    <div id="tree1" data-url="/example_data/"></div>

### javascript

    var $tree = $('#tree1');
    $tree.tree({
      dragAndDrop: true,
      autoOpen: 0
    });