Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
Created July 28, 2015 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamilogorek/166f5e37471a903eef72 to your computer and use it in GitHub Desktop.
Save kamilogorek/166f5e37471a903eef72 to your computer and use it in GitHub Desktop.
isSupportingCSSAnimations function
function isSupportingCSSAnimations () {
var prefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml'];
var el = document.createElement('div');
if (el.style.animationName !== undefined) {
return true;
}
return prefixes.some(function (prefix) {
return el.style[prefix + 'AnimationName'] !== undefined;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment