Skip to content

Instantly share code, notes, and snippets.

@colorful-tones
Created June 11, 2013 14:50
Show Gist options
  • Save colorful-tones/5757509 to your computer and use it in GitHub Desktop.
Save colorful-tones/5757509 to your computer and use it in GitHub Desktop.
Modernizr.load([{
// Test
test: Modernizr.cssanimations,
// If yes:
yep: {
'yesResponse': '/css/yes.css'
},
// If no:
nope: {
'noResponse': ['/js/yes.js', '/css/yes.css']
},
// If, no, once you've loaded the files, do this:
callback: {
'noResponse': function(url, result, key) {
console.log('nope all done for you Sir');
}
}
// No matter what, do the following once everything else has loaded and executed
complete: {
console.log('I'm showing this response in the console because all files and actions are done');
}
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment