diff options
| author | Chris Rebert <[email protected]> | 2014-07-21 00:35:41 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-07-21 00:35:41 -0700 |
| commit | 49519e981614fb8e0c4fabcbb0a632db292c2b3c (patch) | |
| tree | 432dcbb9e967a2858f675df6e1ab3179961cb2bd /docs/dist/js/bootstrap.js | |
| parent | a035ee59ae73510ebdb1064e59b4b16f1da9fc66 (diff) | |
| download | bootstrap-49519e981614fb8e0c4fabcbb0a632db292c2b3c.tar.xz bootstrap-49519e981614fb8e0c4fabcbb0a632db292c2b3c.zip | |
grunt dist
Diffstat (limited to 'docs/dist/js/bootstrap.js')
| -rw-r--r-- | docs/dist/js/bootstrap.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js index 0550cb210..fe977c606 100644 --- a/docs/dist/js/bootstrap.js +++ b/docs/dist/js/bootstrap.js @@ -258,15 +258,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } - // FOCUS SHIM (FOR BUTTON GROUPS) - // ============================== - - function getBtnTarget(target) { - var $target = $(target) - return $target.hasClass('btn') ? $target : $target.parent('.btn') - } - - // BUTTON DATA-API // =============== @@ -277,11 +268,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re Plugin.call($btn, 'toggle') e.preventDefault() }) - .on('focus.bs.button.data-api', '[data-toggle^="button"]', function (e) { - getBtnTarget(e.target).addClass('focus') - }) - .on('blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - getBtnTarget(e.target).removeClass('focus') + .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { + $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus') }) }(jQuery); |
