Skip to content

Instantly share code, notes, and snippets.

@spullara
Created November 24, 2010 17:55
Show Gist options
  • Save spullara/714086 to your computer and use it in GitHub Desktop.
Save spullara/714086 to your computer and use it in GitHub Desktop.
var temp;
if (typeof YUI != 'undefined') {
temp = YUI;
YUI = undefined;
}
loadJS('bagger-yui', 'http://yui.yahooapis.com/combo?3.1.1/build/yui/yui-min.js', false);
// now wait for YUI to load
var waitForYUIJS = setInterval(function() {
// If YUI exists, then library is loaded
if (typeof exports.YUI != 'undefined') {
if (temp) {
YUI = temp;
}
BaggerYUI = exports.YUI;
delete exports;
clearInterval(waitForYUIJS);
bagger___start();
}
}, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment