2013-05-21 22:30:33 -04:00
|
|
|
/* ========================================================================
|
2015-03-16 11:39:31 -04:00
|
|
|
* Bootstrap: transition.js v3.3.4
|
2013-10-29 13:10:47 -04:00
|
|
|
* http://getbootstrap.com/javascript/#transitions
|
2013-05-21 22:30:33 -04:00
|
|
|
* ========================================================================
|
2014-12-31 19:23:48 -05:00
|
|
|
* Copyright 2011-2015 Twitter, Inc.
|
2013-12-18 18:28:08 -05:00
|
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
2013-05-21 22:30:33 -04:00
|
|
|
* ======================================================================== */
|
2011-12-14 21:45:33 -05:00
|
|
|
|
2012-03-24 21:59:04 -04:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
+function ($) {
|
|
|
|
'use strict';
|
2014-06-10 01:18:05 -04:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
|
|
|
|
// ============================================================
|
2011-12-14 21:45:33 -05:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
function transitionEnd() {
|
|
|
|
var el = document.createElement('bootstrap')
|
2011-12-14 21:45:33 -05:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
var transEndEventNames = {
|
|
|
|
WebkitTransition : 'webkitTransitionEnd',
|
|
|
|
MozTransition : 'transitionend',
|
|
|
|
OTransition : 'oTransitionEnd otransitionend',
|
|
|
|
transition : 'transitionend'
|
2013-05-16 14:06:30 -04:00
|
|
|
}
|
2013-12-24 15:40:24 -05:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
for (var name in transEndEventNames) {
|
|
|
|
if (el.style[name] !== undefined) {
|
|
|
|
return { end: transEndEventNames[name] }
|
|
|
|
}
|
2014-06-10 22:56:08 -04:00
|
|
|
}
|
2014-06-12 14:11:04 -04:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
return false // explicit for ie8 ( ._.)
|
|
|
|
}
|
|
|
|
|
|
|
|
// http://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)
|
2014-06-12 14:11:04 -04:00
|
|
|
}
|
2014-06-23 14:07:18 -04:00
|
|
|
}
|
2013-05-16 20:18:15 -04:00
|
|
|
})
|
2012-02-13 21:41:02 -05:00
|
|
|
|
2014-06-23 14:07:18 -04:00
|
|
|
}(jQuery);
|