Skip to content

Instantly share code, notes, and snippets.

@bjarneo
Created January 21, 2015 11:38
Show Gist options
  • Save bjarneo/c00c79fa7e50c71e65e9 to your computer and use it in GitHub Desktop.
Save bjarneo/c00c79fa7e50c71e65e9 to your computer and use it in GitHub Desktop.
JavaScript - css3 transform support
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