Last active
December 27, 2015 11:19
-
-
Save larchanka/7317639 to your computer and use it in GitHub Desktop.
Function `browserTransform` detects css-transforms' support in browser and returns css-property, else it returns false.
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
(function () { | |
this.browserTransform = function () { | |
if ('OTransform' in document.body.style) | |
return '-o-transform'; | |
else if ('webkitTransform' in document.body.style) | |
return '-webkit-transform'; | |
else if ('mozTransform' in document.body.style) | |
return '-moz-transform'; | |
else if ('msTransform' in document.body.style) | |
return '-ms-transform'; | |
else if ('transform' in document.body.style) | |
return 'transform'; | |
else return false; | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment