-
Notifications
You must be signed in to change notification settings - Fork 3
jQuery datatreeview toggle options
Maikel Bos edited this page Dec 28, 2020
·
2 revisions
By default the datatreeview toggle icon will expand and collapse instantly. If you wish to use animation instead, you can achieve this with the data-toggle-duration
property to set the duration and the data-toggle-easing
property to set the animation style on the treeview element.
<div id="example-treeview" data-toggle-duration="1000" data-toggle-easing="linear">
</div>
<script type="text/javascript">
$('#example-treeview').datatreeview({
data: [
{ value: '1', text: 'Foo' },
{ value: '2', text: 'Bar' },
{ value: '3', text: 'Baz' }
]
});
</script>
To provide a full set of options for the toggle function, configure the getToggleOptions
option. See Defaults and options for more information.