http://stackoverflow.com/questions/12136153/dynamically-add-item-to-an-existing-list

by jnerator

HTML

<script src="http://jnerator.com/Versions/jnerator-1.0.0.js"></script>
New Post:
<input id="tagPost" value="Hello" type="text" />
<input type="button" value="Add" onclick="addPost();" />
<hr/>
<div id="page">
  <div id="post1">Post Content</div>
  <div id="post2">Post Content</div>
  <div id="post3">Post Content</div>
  <div id="post4">Post Content</div>
    <!---- Dynamic Post Inserted Here--->
</div>

JavaScript

function addPost() {
    var lastPostElement = page.lastChild;
    var count = page.childNodes.length;    
    var postText = tagPost.value;    
    var jtag = $j.div({ id:'post' + count, child: postText});
    var newPostElement = jtag.dom();
    page.insertBefore(newPostElement, lastPostElement);
}