aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-alerts.js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-09-10 14:04:22 -0700
committerJacob Thornton <[email protected]>2011-09-10 14:04:22 -0700
commit5f65df9e2db7c16c3c64930331a467e18501e20c (patch)
tree317a508fe3b3a79f7b06e273e4d57a5199dd7e0c /js/bootstrap-alerts.js
parent5bc455d3707b87960d32c0672f5afb3b31173ec8 (diff)
downloadbootstrap-5f65df9e2db7c16c3c64930331a467e18501e20c.tar.xz
bootstrap-5f65df9e2db7c16c3c64930331a467e18501e20c.zip
add some more events to alerts and modal and update docs
Diffstat (limited to 'js/bootstrap-alerts.js')
-rw-r--r--js/bootstrap-alerts.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/bootstrap-alerts.js b/js/bootstrap-alerts.js
index e27ac6482..4c9c9394d 100644
--- a/js/bootstrap-alerts.js
+++ b/js/bootstrap-alerts.js
@@ -34,10 +34,11 @@
var Alert = function ( content ) {
var that = this
this.$element = $(content)
- this.$element.delegate('.close', 'click', function (e) {
- e.preventDefault()
- that.close()
- })
+ .bind('alert:hide', $.proxy(this.close, this))
+ .delegate('.close', 'click', function (e) {
+ e.preventDefault()
+ that.close()
+ })
}
Alert.prototype = {