summaryrefslogtreecommitdiff
path: root/bootstrap/fonts/js/transition.js
diff options
context:
space:
mode:
authorsanjeevi012019-07-05 15:30:52 +0530
committersanjeevi012019-07-05 15:33:36 +0530
commit85a9d81638d240f3fa9ed01cb139ef33243b379b (patch)
tree5de2a278bd0b3e8c979defa73b24470a56055a3c /bootstrap/fonts/js/transition.js
parente5a79b1f0f70eb0bc413c5b85139617dbe84b07d (diff)
downloadfossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.tar.gz
fossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.tar.bz2
fossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.zip
Initial commit
Diffstat (limited to 'bootstrap/fonts/js/transition.js')
-rwxr-xr-xbootstrap/fonts/js/transition.js59
1 files changed, 59 insertions, 0 deletions
diff --git a/bootstrap/fonts/js/transition.js b/bootstrap/fonts/js/transition.js
new file mode 100755
index 0000000..5a9a3e3
--- /dev/null
+++ b/bootstrap/fonts/js/transition.js
@@ -0,0 +1,59 @@
+/* ========================================================================
+ * Bootstrap: transition.js v3.4.1
+ * https://getbootstrap.com/docs/3.4/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2019 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ WebkitTransition : 'webkitTransitionEnd',
+ MozTransition : 'transitionend',
+ OTransition : 'oTransitionEnd otransitionend',
+ transition : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // https://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false
+ var $el = this
+ $(this).one('bsTransitionEnd', function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+
+ if (!$.support.transition) return
+
+ $.event.special.bsTransitionEnd = {
+ bindType: $.support.transition.end,
+ delegateType: $.support.transition.end,
+ handle: function (e) {
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+ }
+ }
+ })
+
+}(jQuery);