title: How to Include jQuery.js within One's Own .js Before $(document).ready?
body: <p>I need jQuery.js, so because I don't know how to declare an "include" or "require" within my custom.js, I just paste the whole jQuery.js inside my custom.js, above my code. That makes a pretty huge custom.js script and is most likely redundant if the client already has jQuery.js loaded. Is there a way to "include" or "require" jQuery.js at the top of my custom.js? I have never found an single-file answer to referencing one .js file from another .js file.</p>
  
  <p>Here is the pseudocode for the functionality sought:</p>
  
  <p>Contents of original custom.js:</p>
  
  <pre><code>$(document).ready(do stuff);
  </code></pre>
  
  <p>Pseudocode of contents of custom.js modified to test if jQuery.js is loaded, and if not, load it:</p>
  
  <pre><code>if !jQuery {
    includeAndOrLoadEtc jQuery.js;
  }
  
  $(document).ready(do stuff);
  </code></pre>