Skip to content

Commit

Permalink
cleaner way of preventing double click events + clean up tests for js…
Browse files Browse the repository at this point in the history
…hint
  • Loading branch information
fat committed Jul 18, 2013
1 parent 37e899d commit 4b40ee6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@

$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
var $btn = $(e.target)
if ($btn.has('input').length) return // throw away double event for inputs
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
e.preventDefault()
})

}(window.jQuery);
Expand Down
Loading

0 comments on commit 4b40ee6

Please sign in to comment.