Last active
December 20, 2015 06:08
-
-
Save ischenkodv/6083239 to your computer and use it in GitHub Desktop.
A function that detects CSS transform availability in browsers.
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 getSupportedTransform() { | |
var prefixes = 'transform WebkitTransform MozTransform OTransform msTransform'.split(' '); | |
for(var i = 0; i < prefixes.length; i++) { | |
if(document.createElement('div').style[prefixes[i]] !== undefined) { | |
return prefixes[i]; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment