diff options
Diffstat (limited to 'js/common.js')
-rwxr-xr-x | js/common.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/common.js b/js/common.js index 770f456..4cad187 100755 --- a/js/common.js +++ b/js/common.js @@ -27,4 +27,22 @@ transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform' }; })(); + + window.RATCHET.getTransitionEnd = (function () { + var el = document.createElement('ratchet'); + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + }; + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return transEndEventNames[name]; + } + } + + return transEndEventNames.transition; + })(); }()); |