A Pen by Olivia Osby on CodePen.
Created
January 9, 2015 18:48
-
-
Save oosby/7bba5974621192dcc18a to your computer and use it in GitHub Desktop.
prefixFinder
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 prefixFinder () { | |
var el = document.createElement('prefixer') | |
, transEndEventNames = { | |
'webKit': 'webkitTransition', | |
'moz': 'transition', | |
'o': 'oTransition otransition' | |
} | |
, name | |
, ret; | |
for (name in transEndEventNames) { | |
if (el.style[transEndEventNames[name]] !== undefined) { | |
ret = name; | |
break; | |
} | |
} | |
return ret; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment