mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 13:29:06 +02:00
bind data-api events to document instead of body to allow body replacement
This commit is contained in:
2
js/bootstrap-button.js
vendored
2
js/bootstrap-button.js
vendored
@@ -86,7 +86,7 @@
|
||||
* =============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
||||
$(document).on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
$btn.button('toggle')
|
||||
|
Reference in New Issue
Block a user