bind event before append jquery object
<p>How can I bind event to a not jet printed jquery object?</p>

<p>Example my div is:</p>

<pre><code>var $div = $("&lt;div&gt;my div&lt;/div&gt;");
</code></pre>

<p>I want to bind a click to this not rendered div and then print it on DOM, something like:</p>

<pre><code>$div.click(function(){alert("hello")});
$(body).append($div);
</code></pre>

<p>thx</p>
