<p>I'm trying to add a new node to an jQuery <a href="http://news.kg/wp-content/uploads/tree/" rel="nofollow noreferrer">SimpleTree</a>, but all I seem to be able to get is "sTC.addNode is not a function"... </p>

<pre><code>var simpleTreeCollection = $('.simpleTree').simpleTree({
    animate:true,
    drag:false,
    autoclose: false,
    afterClick:function(node){},
    afterDblClick:function(node){},
    beforeMove:function (destination, source, pos){},
    afterMove:function(destination, source, pos){},
    afterAjax:function() {},
    afterContextMenu:function(node){}
});

simpleTreeCollection.addNode('test', 'test');
</code></pre>

<p>Any suggestions what I might be doing wrong? Is there even the possibility to add a node?</p>

hmm tricky one this and I have to say I dont like the plugin as it uses numerics as id's and w3c states "The attribute's value must begin with a letter in the range A-Z or a-z and may be followed by letters......."
However to get you working u need to select one of the nodes first in order to add to it like this
```
```
//Select first child node in tree
    $('#2').click();
    //Add new node to selected node
    simpleTreeCollection.get(0).addNode(1,'A New Node')
```
```