title: check if element exists after ajax load
body: <p>It's Friday morning and my brain appears to be malfunctioning.</p>
  
  <p>I would like to execute a load of script, but only when a certain element is present on the page. This may have also been loaded via ajax. Which means when I do something like:</p>
  
  <pre><code>if ($('#foo').length &gt; 0) {
      // Do stuff
  });
  </code></pre>
  
  <p>It will only load on direct page loads, not ajax... obviously. I just can't think of the how to trigger this check after an ajax load.</p>
  
  <p>Thanks</p>