jQuery insertBefore(jQuery/list/object source, jQuery/list target)
Inserts a node right before a specific node.
If an existing node is passed as the source, it is being moved before the given node.
The target node must exist and be fully-expanded.

Returns the newly-inserted node.

<ul id="treeview">
    <li>My Project
            <li id="someid">js</li>

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

        treeview.insertBefore({text: "new item"}, $("#someid"));