diff options
| author | Mark Otto <[email protected]> | 2011-10-09 21:25:50 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2011-10-09 21:25:50 -0700 |
| commit | 7c98f1e1fccbb9664bddbc64edb626ffdcf8fe7d (patch) | |
| tree | 03713b4dce199652857e7f28487756037d814438 /js/bootstrap-alerts.js | |
| parent | dd1efdf0d5ec2469978a65c845cc5dfd16b74899 (diff) | |
| parent | c9669be1ec2862b88ffdb296191e82fed79f56a4 (diff) | |
| download | bootstrap-7c98f1e1fccbb9664bddbc64edb626ffdcf8fe7d.tar.xz bootstrap-7c98f1e1fccbb9664bddbc64edb626ffdcf8fe7d.zip | |
Merge branch '2.0-wip' of github.com:twitter/bootstrap into 2.0-wip
Diffstat (limited to 'js/bootstrap-alerts.js')
| -rw-r--r-- | js/bootstrap-alerts.js | 6 |
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 |
