Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js18
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;
+ })();
}());