title: How to determine if jQuery is running on a page (even if jQuery is /after/ the detection script)
body: <p>I'm working on a do-dad that can be embedded in a page like a youtube video. The particular effect I want needs jQuery to work.</p>
  
  <p>I want to load jQuery on the condition that something on the page hasn't already added jQuery.</p>
  
  <p>I though of testing </p>
  
  <pre><code>if (typeof($)=='function'){...
  </code></pre>
  
  <p>but that only works if jQuery is loaded &amp; running by the time the page gets to my script. Since best practices these days is to embed you scripts in the footer, my embed code probably will never see jQuery most of the time anyway.</p>
  
  <p>I thought of doing the test <code>onready</code> instead of <code>onload</code>, but the <code>onready</code> function is inside of jQuery.  (I suppose I could use a standalone script?  is there a good one?)</p>
  
  <p>Lastly, I though of testing for jQuery after a timeout delay, but this seems inelegant at best and unreliable at worst.</p>
  
  <p>Any thoughts?</p>