info@54: /* ======================================================================== info@54: * Bootstrap: transition.js v3.0.3 info@54: * http://getbootstrap.com/javascript/#transitions info@54: * ======================================================================== info@54: * Copyright 2013 Twitter, Inc. info@54: * info@54: * Licensed under the Apache License, Version 2.0 (the "License"); info@54: * you may not use this file except in compliance with the License. info@54: * You may obtain a copy of the License at info@54: * info@54: * http://www.apache.org/licenses/LICENSE-2.0 info@54: * info@54: * Unless required by applicable law or agreed to in writing, software info@54: * distributed under the License is distributed on an "AS IS" BASIS, info@54: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. info@54: * See the License for the specific language governing permissions and info@54: * limitations under the License. info@54: * ======================================================================== */ info@54: info@54: info@54: +function ($) { "use strict"; info@54: info@54: // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) info@54: // ============================================================ info@54: info@54: function transitionEnd() { info@54: var el = document.createElement('bootstrap') info@54: info@54: var transEndEventNames = { info@54: 'WebkitTransition' : 'webkitTransitionEnd' info@54: , 'MozTransition' : 'transitionend' info@54: , 'OTransition' : 'oTransitionEnd otransitionend' info@54: , 'transition' : 'transitionend' info@54: } info@54: info@54: for (var name in transEndEventNames) { info@54: if (el.style[name] !== undefined) { info@54: return { end: transEndEventNames[name] } info@54: } info@54: } info@54: } info@54: info@54: // http://blog.alexmaccaw.com/css-transitions info@54: $.fn.emulateTransitionEnd = function (duration) { info@54: var called = false, $el = this info@54: $(this).one($.support.transition.end, function () { called = true }) info@54: var callback = function () { if (!called) $($el).trigger($.support.transition.end) } info@54: setTimeout(callback, duration) info@54: return this info@54: } info@54: info@54: $(function () { info@54: $.support.transition = transitionEnd() info@54: }) info@54: info@54: }(jQuery);