expanded

Gets or sets the expanded state for a given node.

void expanded(boolExpanded, jQuery/list, doneCallback)
Sets the expanded state. If a node along the path is not expanded, it will be expanded. If a node along the path is not loaded, it will be loaded first before expanded. When the last node in the path is expanded, the done callback function is called, if any.

bool expanded(boolExpanded, jQuery/list)
Returns whether a given node is expanded or not.

<ul id="treeview">
    <li>My Project
        <ul>
            <li id="someid">js</li>
            <li>css</li>
        </ul>
        <li>index.html<li>
        <li>upload.php<li>
    </li>
</ul>

<script type="text/javascript">
    jQuery(function ($) {
        var treeview = $("#treeview").shieldTreeView().swidget();

        // expand a node
        treeview.expanded(true, [0]);
    });
</script>