diff options
| author | Jacob Thornton <[email protected]> | 2011-12-24 22:16:48 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-12-24 22:16:48 -0800 |
| commit | a3822cfa843c9ecce437cf66257c7c1060881050 (patch) | |
| tree | 996ca5227172ac170a6288aa94a80daca543af23 /js | |
| parent | 04fee21121473606b425007f0d5cfd7853b1460b (diff) | |
| parent | 2ebc0ad2ef13c4eb9ab2e7b57ff6ca661687ca4e (diff) | |
| download | bootstrap-a3822cfa843c9ecce437cf66257c7c1060881050.tar.xz bootstrap-a3822cfa843c9ecce437cf66257c7c1060881050.zip | |
Merge pull request #842 from jonathaningram/patch-2
Add close and closed hooks for alert
Diffstat (limited to 'js')
| -rw-r--r-- | js/bootstrap-alert.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/bootstrap-alert.js b/js/bootstrap-alert.js index 90961cdd3..1ce8f01bf 100644 --- a/js/bootstrap-alert.js +++ b/js/bootstrap-alert.js @@ -39,6 +39,8 @@ , selector = $this.attr('data-target') || $this.attr('href') , $parent = $(selector) + $parent.trigger('close') + e && e.preventDefault() $parent.length || ($parent = $this.hasClass('alert-message') ? $this : $this.parent()) @@ -47,6 +49,8 @@ function removeElement() { $parent.remove() + + $parent.trigger('closed') } $.support.transition && $parent.hasClass('fade') ? |
