diff options
| author | Jonathan Persson <[email protected]> | 2015-07-31 14:30:19 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2016-05-29 12:18:29 +0300 |
| commit | fc26740876eb8d833391bf747bd6677a10405e0d (patch) | |
| tree | d5d64687df5f5855cb890ef8005fb4e87e18bd52 /js/button.js | |
| parent | 21d9175fefdb023a27f5c2f0db7cb8917d06de64 (diff) | |
| download | bootstrap-fc26740876eb8d833391bf747bd6677a10405e0d.tar.xz bootstrap-fc26740876eb8d833391bf747bd6677a10405e0d.zip | |
Merge two jQuery `is()` calls in the button component by using the OR operator in the selector instead of two function calls with the OR operator between them.
Closes #16918.
Diffstat (limited to 'js/button.js')
| -rw-r--r-- | js/button.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/button.js b/js/button.js index 252531cfe..dba747c3a 100644 --- a/js/button.js +++ b/js/button.js @@ -110,7 +110,7 @@ .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { var $btn = $(e.target).closest('.btn') Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) { + if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { // Prevent double click on radios, and the double selections (so cancellation) on checkboxes e.preventDefault() // The target component still receive the focus |
