Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.