Skip to content

Instantly share code, notes, and snippets.

@micmath
Created June 30, 2010 15:14
Show Gist options
  • Save micmath/458773 to your computer and use it in GitHub Desktop.
Save micmath/458773 to your computer and use it in GitHub Desktop.
<!-- hypothetically...
All teams share a single loader tool. This loader will asynchronously pull in
one (or more) jquery versions and cache them.
-->
<script src="qLoader.js"></script>
<script type="text/javascript"> // Team 1
qLoader.load('jquery-1.3').then(function($) {
// in here $ == jquery-1.3
});
</script>
<script type="text/javascript"> // Team 2
qLoader.load('jquery-1.4').then(function($) {
// in here $ == jquery-1.4
});
</script>
<script type="text/javascript"> // Team 3
qLoader.load('jquery-1.4').then(function($) {
// in here $ == cached jquery-1.4
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment