title: jQuery on load of dynamic element
body: <p>I'm trying to do some conditional manipulation of elements that are dynamically added to some container on a page, but I'm missing an event.</p>
  
  <p>Say I have a container:</p>
  
  <pre><code>&lt;div id="container"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I can easily bind an event handler to the click function for all new elements, using</p>
  
  <pre><code>$('#container').on('click', '.sub-element', function() { ... });
  </code></pre>
  
  <p>But what do I bind to in order to get a "one-time" hook when the element is added to <code>#container</code>. I have tried to bind to <code>ready</code> and <code>load</code> to no avail. Is there any way to do this, or do I have to come up with another solution to my problem?</p>
  
  <p><a href="http://jsfiddle.net/ggHh7/1/" rel="noreferrer">This fiddle contains my non-working example</a>.</p>