YepNope test for Modernizr. Learn more: http://benfrain.com/beginner-and-designers-guide-to-using-modernizr-to-solve-cross-browser-challenges/
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');
}
}]);