Created
February 26, 2011 22:35
-
-
Save amadeus/845696 to your computer and use it in GitHub Desktop.
JS Prefix Tests
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
var prefix = (function(){ | |
var list = ['', 'webkit', 'Moz', 'O', 'ms'], | |
element = document.html; | |
for (var i = 0; i < list.length; i++){ | |
var prefix = list[i]; | |
if (element.style[prefix ? prefix + 'Transform' : 'transform'] != null) | |
return prefix.toLowerCase(); | |
} | |
return ''; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment