mirror of
https://github.com/twbs/bootstrap.git
synced 2025-07-31 02:40:26 +02:00
cleaner way of preventing double click events + clean up tests for jshint
This commit is contained in:
@@ -99,9 +99,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);
|
||||
|
Reference in New Issue
Block a user