File indexing completed on 2024-05-19 06:00:31
0001 /* ======================================================================== 0002 * Bootstrap: transition.js v3.0.3 0003 * http://getbootstrap.com/javascript/#transitions 0004 * ======================================================================== 0005 * Copyright 2013 Twitter, Inc. 0006 * 0007 * Licensed under the Apache License, Version 2.0 (the "License"); 0008 * you may not use this file except in compliance with the License. 0009 * You may obtain a copy of the License at 0010 * 0011 * http://www.apache.org/licenses/LICENSE-2.0 0012 * 0013 * Unless required by applicable law or agreed to in writing, software 0014 * distributed under the License is distributed on an "AS IS" BASIS, 0015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0016 * See the License for the specific language governing permissions and 0017 * limitations under the License. 0018 * ======================================================================== */ 0019 0020 0021 +function ($) { "use strict"; 0022 0023 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 0024 // ============================================================ 0025 0026 function transitionEnd() { 0027 var el = document.createElement('bootstrap') 0028 0029 var transEndEventNames = { 0030 'WebkitTransition' : 'webkitTransitionEnd' 0031 , 'MozTransition' : 'transitionend' 0032 , 'OTransition' : 'oTransitionEnd otransitionend' 0033 , 'transition' : 'transitionend' 0034 } 0035 0036 for (var name in transEndEventNames) { 0037 if (el.style[name] !== undefined) { 0038 return { end: transEndEventNames[name] } 0039 } 0040 } 0041 } 0042 0043 // http://blog.alexmaccaw.com/css-transitions 0044 $.fn.emulateTransitionEnd = function (duration) { 0045 var called = false, $el = this 0046 $(this).one($.support.transition.end, function () { called = true }) 0047 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 0048 setTimeout(callback, duration) 0049 return this 0050 } 0051 0052 $(function () { 0053 $.support.transition = transitionEnd() 0054 }) 0055 0056 }(jQuery);