selected

Gets the currently selected node or selects a given node. Accepts a jQuery object, DOM Element or a path identifying the node.

void selected(jQuery/List)
Selects the given node.

jQuery selected()
Returns the currently selected node.

<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();

        // select some node
        treeview.selected([0, 1]);
    });
</script>