title: Embed jQuery in own module
body: <p>I have written a JavaScript component which depends on jQuery. The problem here is, that I'd like to provide the component in such a way, that the user who uses my component doesn't have to care about dependencies (like jquery); the user just have to include my script into the html file. An other problem is, that the user may use jQuery in his own scripts, so that there are multiple instances of jQuery included.</p>
  
  <p>My solution for that is this:</p>
  
  <pre><code>var myscope = (function () {
  
      // PASTE the minfied jQuery Code (and plugins) here!!!
      var $ = jQuery.noConflict(true);
  
      return { // public stuff
  
      }
  
  })();
  </code></pre>
  
  <p>Do you have any recomendations or ideas to do it better?</p>
  
  <p>//Edit:
  The user shouldn't even know (excepts he reads the source code of my component) that the component depends on jquery.</p>
  
  <p>Best regards.</p>