info@54
|
1 |
/* ========================================================================
|
info@54
|
2 |
* Bootstrap: transition.js v3.0.3
|
info@54
|
3 |
* http://getbootstrap.com/javascript/#transitions
|
info@54
|
4 |
* ========================================================================
|
info@54
|
5 |
* Copyright 2013 Twitter, Inc.
|
info@54
|
6 |
*
|
info@54
|
7 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
info@54
|
8 |
* you may not use this file except in compliance with the License.
|
info@54
|
9 |
* You may obtain a copy of the License at
|
info@54
|
10 |
*
|
info@54
|
11 |
* http://www.apache.org/licenses/LICENSE-2.0
|
info@54
|
12 |
*
|
info@54
|
13 |
* Unless required by applicable law or agreed to in writing, software
|
info@54
|
14 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
info@54
|
15 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
info@54
|
16 |
* See the License for the specific language governing permissions and
|
info@54
|
17 |
* limitations under the License.
|
info@54
|
18 |
* ======================================================================== */
|
info@54
|
19 |
|
info@54
|
20 |
|
info@54
|
21 |
+function ($) { "use strict";
|
info@54
|
22 |
|
info@54
|
23 |
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
|
info@54
|
24 |
// ============================================================
|
info@54
|
25 |
|
info@54
|
26 |
function transitionEnd() {
|
info@54
|
27 |
var el = document.createElement('bootstrap')
|
info@54
|
28 |
|
info@54
|
29 |
var transEndEventNames = {
|
info@54
|
30 |
'WebkitTransition' : 'webkitTransitionEnd'
|
info@54
|
31 |
, 'MozTransition' : 'transitionend'
|
info@54
|
32 |
, 'OTransition' : 'oTransitionEnd otransitionend'
|
info@54
|
33 |
, 'transition' : 'transitionend'
|
info@54
|
34 |
}
|
info@54
|
35 |
|
info@54
|
36 |
for (var name in transEndEventNames) {
|
info@54
|
37 |
if (el.style[name] !== undefined) {
|
info@54
|
38 |
return { end: transEndEventNames[name] }
|
info@54
|
39 |
}
|
info@54
|
40 |
}
|
info@54
|
41 |
}
|
info@54
|
42 |
|
info@54
|
43 |
// http://blog.alexmaccaw.com/css-transitions
|
info@54
|
44 |
$.fn.emulateTransitionEnd = function (duration) {
|
info@54
|
45 |
var called = false, $el = this
|
info@54
|
46 |
$(this).one($.support.transition.end, function () { called = true })
|
info@54
|
47 |
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
info@54
|
48 |
setTimeout(callback, duration)
|
info@54
|
49 |
return this
|
info@54
|
50 |
}
|
info@54
|
51 |
|
info@54
|
52 |
$(function () {
|
info@54
|
53 |
$.support.transition = transitionEnd()
|
info@54
|
54 |
})
|
info@54
|
55 |
|
info@54
|
56 |
}(jQuery);
|