summaryrefslogtreecommitdiff
path: root/bower_components/bootstrap/js/alert.js
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/bootstrap/js/alert.js')
-rw-r--r--bower_components/bootstrap/js/alert.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/bower_components/bootstrap/js/alert.js b/bower_components/bootstrap/js/alert.js
index 516fe4ff..0efd92cb 100644
--- a/bower_components/bootstrap/js/alert.js
+++ b/bower_components/bootstrap/js/alert.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: alert.js v3.1.1
+ * Bootstrap: alert.js v3.2.0
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -18,6 +18,8 @@
$(el).on('click', dismiss, this.close)
}
+ Alert.VERSION = '3.2.0'
+
Alert.prototype.close = function (e) {
var $this = $(this)
var selector = $this.attr('data-target')
@@ -42,12 +44,13 @@
$parent.removeClass('in')
function removeElement() {
- $parent.trigger('closed.bs.alert').remove()
+ // detach from parent, fire event then clean up data
+ $parent.detach().trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent
- .one($.support.transition.end, removeElement)
+ .one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(150) :
removeElement()
}
@@ -56,9 +59,7 @@
// ALERT PLUGIN DEFINITION
// =======================
- var old = $.fn.alert
-
- $.fn.alert = function (option) {
+ function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.alert')
@@ -68,6 +69,9 @@
})
}
+ var old = $.fn.alert
+
+ $.fn.alert = Plugin
$.fn.alert.Constructor = Alert