Skip to content

Instantly share code, notes, and snippets.

@pgarciacamou
Last active August 29, 2015 14:20
Show Gist options
  • Save pgarciacamou/ee96a23018946c64a56f to your computer and use it in GitHub Desktop.
Save pgarciacamou/ee96a23018946c64a56f to your computer and use it in GitHub Desktop.
Transform feature detection
"use strict";
window.transformProp = (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