aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-button.js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-02-18 23:29:58 -0800
committerJacob Thornton <[email protected]>2012-02-18 23:29:58 -0800
commit3d58b4622671bc51c22c857641db3b988e73632a (patch)
treec2449b661858c5ab4846ad40f94648a1833033b6 /js/bootstrap-button.js
parent7ec09d0db9b1117d708682a08efaa55045e6926e (diff)
downloadbootstrap-3d58b4622671bc51c22c857641db3b988e73632a.tar.xz
bootstrap-3d58b4622671bc51c22c857641db3b988e73632a.zip
fix bootstrap-button toggle regression + tests
Diffstat (limited to 'js/bootstrap-button.js')
-rw-r--r--js/bootstrap-button.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js
index a0e053547..0238ca3cb 100644
--- a/js/bootstrap-button.js
+++ b/js/bootstrap-button.js
@@ -91,7 +91,9 @@
$(function () {
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
- $(e.currentTarget).button('toggle')
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
})
})