mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
wrap for domready
This commit is contained in:
parent
a0cb72f9ae
commit
f1d17223b8
11
examples/assets/js/bootstrap-alerts.js
vendored
11
examples/assets/js/bootstrap-alerts.js
vendored
@ -3,6 +3,10 @@
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
$(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
@ -10,12 +14,6 @@
|
||||
return support
|
||||
})()
|
||||
|
||||
|
||||
/* SHARED VARS
|
||||
* =========== */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
// set CSS transition event type
|
||||
if ( $.support.transition ) {
|
||||
transitionEnd = "TransitionEnd"
|
||||
@ -28,6 +26,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
/* ALERT CLASS DEFINITION
|
||||
* ====================== */
|
||||
|
4
examples/assets/js/bootstrap-dropdown.js
vendored
4
examples/assets/js/bootstrap-dropdown.js
vendored
@ -7,7 +7,9 @@
|
||||
$('a.menu').parent('li').removeClass('open')
|
||||
}
|
||||
|
||||
$('body').bind("click", clearMenus)
|
||||
$(function () {
|
||||
$(window).bind("click", clearMenus)
|
||||
})
|
||||
|
||||
$.fn.dropdown = function ( options ) {
|
||||
return this.each(function () {
|
||||
|
17
examples/assets/js/bootstrap-modal.js
vendored
17
examples/assets/js/bootstrap-modal.js
vendored
@ -3,6 +3,10 @@
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
$(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
@ -10,13 +14,6 @@
|
||||
return support
|
||||
})()
|
||||
|
||||
|
||||
/* SHARED VARS
|
||||
* =========== */
|
||||
|
||||
var $window = $('body')
|
||||
, transitionEnd
|
||||
|
||||
// set CSS transition event type
|
||||
if ( $.support.transition ) {
|
||||
transitionEnd = "TransitionEnd"
|
||||
@ -29,6 +26,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
/* MODAL PUBLIC CLASS DEFINITION
|
||||
* ============================= */
|
||||
@ -127,13 +126,13 @@
|
||||
, escape: function () {
|
||||
var that = this
|
||||
if ( this.isOpen && this.settings.closeOnEscape ) {
|
||||
$window.bind('keyup.modal.escape', function ( e ) {
|
||||
$(window).bind('keyup.modal.escape', function ( e ) {
|
||||
if ( e.which == 27 ) {
|
||||
that.close()
|
||||
}
|
||||
})
|
||||
} else if ( !this.isOpen ) {
|
||||
$window.unbind('keyup.modal.escape')
|
||||
$(window).unbind('keyup.modal.escape')
|
||||
}
|
||||
}
|
||||
|
||||
|
12
examples/assets/js/bootstrap-twipsy.js
vendored
12
examples/assets/js/bootstrap-twipsy.js
vendored
@ -5,6 +5,10 @@
|
||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||
* ======================================================= */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
$(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
var thisBody = document.body || document.documentElement
|
||||
, thisStyle = thisBody.style
|
||||
@ -12,12 +16,6 @@
|
||||
return support
|
||||
})()
|
||||
|
||||
|
||||
/* SHARED VARS
|
||||
* =========== */
|
||||
|
||||
var transitionEnd
|
||||
|
||||
// set CSS transition event type
|
||||
if ( $.support.transition ) {
|
||||
transitionEnd = "TransitionEnd"
|
||||
@ -30,6 +28,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
/* TWIPSY PUBLIC CLASS DEFINITION
|
||||
* ============================== */
|
||||
|
Loading…
x
Reference in New Issue
Block a user