<script type='text/javascript'>
    $(window).load(function(){
        $('.tree-toggle').click(function () {
            $(this).parent().children('ul.tree').toggle(200);
        });
    });
</script>

<div class="well">
    <ul class="nav nav-list">
        <h2>Samples</h2>
        <ul>
            <ul class="nav nav-list tree">
                {% for category in parent_categories %}
                    {% include "three_d_viewer/Old/treenode.html" %}
                {% endfor %}
            </ul>
        </ul>
    </ul>
</div>
