aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-alerts.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/bootstrap-alerts.js')
-rw-r--r--js/bootstrap-alerts.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/bootstrap-alerts.js b/js/bootstrap-alerts.js
index 82bcac524..4498270cb 100644
--- a/js/bootstrap-alerts.js
+++ b/js/bootstrap-alerts.js
@@ -53,7 +53,7 @@
var Alert = function ( content, selector ) {
this.$element = $(content)
- .delegate(selector || '.close', 'click', this.close)
+ .delegate('[data-alert-dismiss]', 'click', this.close)
}
Alert.prototype = {
@@ -62,6 +62,8 @@
var $element = $(this).parent('.alert-message')
e && e.preventDefault()
+ e && e.stopPropagation()
+
$element.removeClass('in')
function removeElement () {
@@ -98,7 +100,7 @@
}
$(document).ready(function () {
- new Alert($('body'), '.alert-message[data-alert] .close')
+ new Alert($('body'))
})
})( window.jQuery || window.ender ) \ No newline at end of file