1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +02:00

fix bootstrap-button toggle regression + tests

This commit is contained in:
Jacob Thornton
2012-02-18 23:29:58 -08:00
parent 7ec09d0db9
commit 3d58b46226
4 changed files with 30 additions and 3 deletions

Binary file not shown.

View File

@@ -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')
})
})