Wijmo UI for the Web
Markup and Scripting
Wijmo User Guide > Widgets > Tree > Markup and Scripting

The HTML markup for a wijTree widget looks like this.

Markup
Copy Code
<ul id="tree">   
   <li><a>Tree Node 1</a></li>   
   <li><a>Tree Node 2</a>
   <ul>
       <li><a>Tree Node 2a</a></li>
       <li><a>Tree Node 2b</a></li>
   </ul>
</li>
</ul>

You can initialize the widget with the following jQuery script.

Script
Copy Code
<script id="scriptInit" type="text/javascript">
    $(document).ready(function () {
        $("#tree").wijtree({
            expandCollapseHoverUsed: true
        });
    });
</script>

The markup and script featured here results in the following live widget. Mouse over the triangle to expand Tree Node 2.

See Also

Reference

KO