Add events to the DOM
<p>I have a trouble creating the DOM:</p>

<pre><code>{
    ...
    DOM = DOM + '&lt;td colspan="3" align="center"&gt;';
    DOM = DOM + '&lt;div id="primero" onClick(imprimir());&gt; plz &lt;/div&gt;';
    DOM = DOM + '&lt;/td&gt;';
    ...
    $('#test').html(DOM);
}

function imprimir() {
    console.log(' ready!');
}
</code></pre>

<p>but that onclick doesn't work. Any ideas?</p>
