summaryrefslogtreecommitdiffstats
path: root/libs/jquery-loader.js
blob: 84a060160498f64e8fbac38aecf45706f8539b6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
(function() {
  // Default to the local version.
  var path = '../libs/jquery/jquery.js';
  // Get any jquery=___ param from the query string.
  var jqversion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/);
  // If a version was specified, use that version from code.jquery.com.
  if (jqversion) {
    path = 'http://code.jquery.com/jquery-' + jqversion[1] + '.js';
  }
  // This is the only time I'll ever use document.write, I promise!
  document.write('<script src="' + path + '"></script>');
}());