--- title: Javascript tree with drag and drop layout: page js: examples/drag_and_drop.js css: example.css ---

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:

html

{% highlight html %}
{% endhighlight %}

javascript

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