---
title: Javascript tree with autoscroll
js: examples/autoscroll.js
---
« Example 6
Example 8 »
Example 7 - autoscroll
This is an example of autoscroll. The tree will scroll automatically if you
drag an item outside of the tree.
Autoscroll will work automatically. There is no option for it.
html
{% highlight html %}
{% endhighlight %}
css
{% highlight css %}
#scroll-container {
height: 200px;
overflow-y: scroll;
user-select: none;
}
{% endhighlight %}
js
{% highlight js %} $('#tree1').tree({ data: ExampleData.exampleData }); {%
endhighlight %}