Created
November 29, 2012 14:13
-
-
Save jorgeguberte/4169357 to your computer and use it in GitHub Desktop.
CSS3 Transitions fallback checker (Javascript)
This file contains hidden or 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
function cssTransitions() { | |
m = document.createElement('z'); | |
s = m.style; | |
function test_props( p ) { | |
for ( var i in p ) { | |
if ( s[ p[i] ] ) { | |
return true; | |
} | |
} | |
return false; | |
} | |
function test_props_all( prop ) { | |
d = 'Webkit Moz O ms Khtml'.split(' '); | |
var u = prop.charAt(0).toUpperCase() + prop.substr(1); | |
e = (prop + ' ' + d.join(u + ' ') + u).split(' '); | |
return test_props( e ); | |
} | |
return test_props_all( 'animationName' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment