Skip to content

Instantly share code, notes, and snippets.

@rgrove
Created February 1, 2011 21:31
Show Gist options
  • Save rgrove/806731 to your computer and use it in GitHub Desktop.
Save rgrove/806731 to your computer and use it in GitHub Desktop.
function both(cssURLs, jsURLs, callback) {
var cssDone, jsDone;
function finish() {
if (cssDone && jsDone) {
callback();
}
}
LazyLoad.css(cssURLs, function () { cssDone = 1; finish(); });
LazyLoad.js(jsURLs, function () { jsDone = 1; finish(); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment