jQuery DOM element creation
<p>I'm creating some elements using this code:</p>

<pre><code>var itemButton = $('&lt;button /&gt;',{'id': 'searchItemButtonId'+p[i].Id, 'class': 'itemButton', 'onclick':'javascript:alert();'}).append('Add');
</code></pre>

<p>The item is created with correct id and class set but the 'onclick' part doesn't work. Any ideea what is the problem here?</p>
