JSFiddle - React, Tailwind, and code Playground

HTML

<button id="button">Add an Item</button>
<ul id="foo">
    <li>Beef Jerky</li>
    <li>Smoked Salmon</li>
    <li>Rocky Mountain Oysters</li>
</ul>

CSS

body {
    font-family: helvetica, arial;
}

ul#foo li {
    background: #f0f0f0;
    border: solid 1px #ccc;
    padding: 0.5em 1em;
}

JavaScript

$('button').addEvent('click',function(){
    var time = new Date().getTime();
    new Element('li', { text: 'New one at ' + time }).inject('foo', 'top')
});

var el = $('foo')l
$('foo').addEvent('click:relay())', function(){  
    alert(this.get('text'));
});