title: Can I use multiple versions of jQuery on the same page?
body: <p>A project I'm working on requires the use of jQuery on customers' Web pages. Customers will insert a chunk of code that we'll supply which includes a few <code>&lt;script&gt;</code> elements that build a widget in a <code>&lt;script&gt;</code>-created <code>&lt;iframe&gt;</code>. If they aren't already using the latest version of jQuery, this will also include (most likely) a <code>&lt;script&gt;</code> for Google's hosted version of jQuery.</p>
  
  <p>The problem is that some customers may already have an older version of jQuery installed. While this may work if it's at least a fairly recent version, our code does rely on some recently introduced functionality in the jQuery library, so there are bound to be instances when a customer's jQuery version is just too old. We can't require that they upgrade to the latest version of jQuery.</p>
  
  <p>Is there any way to load a newer version of jQuery to use only within the context of our code, that will not interfere with, or affect, any code on the customer's page? Ideally, maybe we could check for the presence of jQuery, detect the version, and if it's too old, then somehow load the most recent version just to use for our code.</p>
  
  <p>I had the idea of loading jQuery in an <code>&lt;iframe&gt;</code> in the customer's domain that also includes our <code>&lt;script&gt;</code>, which seems like it might be feasible, but I'm hoping there's a more elegant way to do it (not to mention without the performance and complexity penalties of extra <code>&lt;iframe&gt;</code>s).</p>