Created
June 11, 2013 14:50
-
-
Save colorful-tones/5757509 to your computer and use it in GitHub Desktop.
YepNope test for Modernizr. Learn more: http://benfrain.com/beginner-and-designers-guide-to-using-modernizr-to-solve-cross-browser-challenges/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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