Skip to content

Instantly share code, notes, and snippets.

@matijs
Created August 6, 2014 13:26
Show Gist options
  • Save matijs/49587c7c8c6df58a47a0 to your computer and use it in GitHub Desktop.
Save matijs/49587c7c8c6df58a47a0 to your computer and use it in GitHub Desktop.
feature detect css transforms
var hasTransforms = (function() {
var propNames = ["transform", "MozTransform", "webkitTransform", "msTransform"];
var i = 0;
var length = propNames.length;
for (; i < length; i++) {
if (typeof document.documentElement.style[propNames[i]] === "string") return true;
}
return false;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment