Skip to content

Instantly share code, notes, and snippets.

@fakedarren
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fakedarren/705c59069bf91fddd46c to your computer and use it in GitHub Desktop.
Save fakedarren/705c59069bf91fddd46c to your computer and use it in GitHub Desktop.
jQuery Roulette
(function(){
var script = document.createElement('script'),
major = Math.random() * (2 - 1) + 1 ,
minor = 0;
if (major === 1){
minor = Math.random() * (11 - 0);
} else {
minor = Math.random() * (2 - 1) + 1;
}
script.type = 'text/javascript';
script.async = true;
script.src = 'http://code.jquery.com/jquery-' + Math.floor(major) + '.' + Math.floor(minor) + '.0.js';
document.getElementsByTagName('head')[0].appendChild(script);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment