title: Does AJAX loaded content get a "document.ready"?
body: <p>Yesterday I had an issue where a <code>.on('click')</code> event handler I was assigning wasn't working right. Turns out it's because I was was trying to apply that <code>.on('click')</code> before that element existed in the DOM, because it was being loaded via AJAX, and therefore didn't exist yet when the <code>document.ready()</code> got to that point.</p>
  
  <p>I solved it with an awkward workaround, but my question is, if I were to put a <code>&lt;script&gt;</code> tag IN the ajax loaded content and another <code>document.ready()</code> within that, would that second <code>document.ready()</code> be parsed ONLY once that ajax content is done being loaded? In other words, does it consider that separately loaded ajax content to be another <code>document</code>, and if so, does having another <code>document.ready()</code> within that ajax-loaded HTML work the way I think it does?</p>
  
  <p>Alternatively; what would be a better way to handle this situation? (needing to attach an event listener to a DOM element that doesn't yet exist on <code>document.ready()</code>)</p>