jQuery: how to add onlick event to a dynamic generated div?
<p>I want to add a onclick event to a div which generated using folowing code:</p>

<pre><code>$("&lt;div /&gt;").attr("city", $(this).attr("city"))
            .attr("state", $(this).attr("state"))
            .html($(this).attr("city") + ',' + $(this).attr("state"))
            .appendTo($('#cityList'));
</code></pre>

<p>Should I write onlick event in html()?</p>
