Permalink
Browse files

Update vendor/assets/javascripts/bootstrap-button.js

  • Loading branch information...
1 parent f71cf6e commit 1afd1c374b2fdf8d9139a5c54accdf88fbc27e4e Graham Powrie committed Mar 22, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 vendor/assets/javascripts/bootstrap-button.js
View
4 vendor/assets/javascripts/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')
})
})

0 comments on commit 1afd1c3

Please sign in to comment.