Created
January 21, 2015 11:38
-
-
Save bjarneo/c00c79fa7e50c71e65e9 to your computer and use it in GitHub Desktop.
JavaScript - css3 transform support
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
var isTransformSupported = function() { | |
var prefixes = [ | |
'transform', | |
'WebkitTransform', | |
'MozTransform', | |
'OTransform', | |
'msTransform' | |
], len = prefixes.length; | |
while (len--) { | |
if (document.createElement('div').style[prefixes[len]] !== undefined) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment