title: jQuery add event for a selector that hasn't been "added" to page yet
body: <p>I have a <code>&lt;div&gt;</code> tag that gets added to the page depending on user variables (I'm using jquery append() to add it to the page)</p>
  
  <pre><code>&lt;div id="message"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I would like to have a click event for this div, but I think I am having problems because I am listening for the event before the div is added to the page.</p>
  
  <pre><code>$(document).ready(function(){
    $('#message').click(function() { console.log('clicked'); // no console message? };
  });
  </code></pre>