Skip to content

Instantly share code, notes, and snippets.

@billymoon
Forked from op1ekun/jQuery-YUI-commonJS.js
Last active December 18, 2015 19:00
Show Gist options
  • Save billymoon/5830008 to your computer and use it in GitHub Desktop.
Save billymoon/5830008 to your computer and use it in GitHub Desktop.
var module = {
exports : {}
}
YUI.add('dlp-jquery-commonjs', function(Y) {
function getFile(url) {
if (window.XMLHttpRequest) {
AJAX=new XMLHttpRequest();
} else {
AJAX=new ActiveXObject("Microsoft.XMLHTTP");
}
if (AJAX) {
AJAX.open("GET", url, false);
AJAX.send(null);
return AJAX.responseText;
} else {
return false;
}
}
getFile('http://code.jquery.com/jquery-1.10.1.min.js');
Y.namespace('dlp').jQuery = module.exports;
}, '1.10.1', {
requires : [ 'get' ]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment