Skip to content

Instantly share code, notes, and snippets.

@oosby
Created January 9, 2015 18:48
Show Gist options
  • Save oosby/7bba5974621192dcc18a to your computer and use it in GitHub Desktop.
Save oosby/7bba5974621192dcc18a to your computer and use it in GitHub Desktop.
prefixFinder
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