Get started with jstree CDN

MIT licensed

JSTree: Interactive tree structures for hierarchical JS data.

Tags:
  • ui
  • tree
  • jstree

Stable version

Copied!

How to start using jstree CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with jstree CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.16/themes/default/style.min.css" referrerpolicy="no-referrer" />
</head>
<body>
    <div id="tree"></div>
    <script src="https://cdn.cdnhub.io/jstree/3.3.16/jstree.min.js"></script>
    <script>
        $(document).ready(function () {
            $('#tree').jstree({
                'core': {
                    'data': [
                        {
                            'id': 'root',
                            'text': 'Root',
                            'children': [
                                {
                                    'id': 'page_1',
                                    'text': 'Page 1'
                                },
                                {
                                    'id': 'page_2',
                                    'text': 'Page 2'
                                }
                            ]
                        }
                    ]
                }
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions