diff options
| author | Mark Otto <[email protected]> | 2017-05-27 15:26:48 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-05-27 15:26:48 -0700 |
| commit | 8f67ac19a761b8d3ecc80485c3f54aa6ba4fa910 (patch) | |
| tree | d5a2aba4e2e762b283e7cfe60f00e1f239105bbe /docs/assets/js/src/application.js | |
| parent | 6c3f833076a9fa68601741e3e21bd07ad79b7d8a (diff) | |
| parent | db44e4b311317ef760f8412cc33c84146959b248 (diff) | |
| download | bootstrap-8f67ac19a761b8d3ecc80485c3f54aa6ba4fa910.tar.xz bootstrap-8f67ac19a761b8d3ecc80485c3f54aa6ba4fa910.zip | |
Merge branch 'v4-dev' into v4-docs-streamlined
Diffstat (limited to 'docs/assets/js/src/application.js')
| -rw-r--r-- | docs/assets/js/src/application.js | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js index 529b0c1b8..b98c3a5ea 100644 --- a/docs/assets/js/src/application.js +++ b/docs/assets/js/src/application.js @@ -4,16 +4,16 @@ /*! * JavaScript for Bootstrap's docs (https://getbootstrap.com) - * Copyright 2011-2016 The Bootstrap Authors - * Copyright 2011-2016 Twitter, Inc. + * Copyright 2011-2017 The Bootstrap Authors + * Copyright 2011-2017 Twitter, Inc. * Licensed under the Creative Commons Attribution 3.0 Unported License. For * details, see https://creativecommons.org/licenses/by/3.0/. */ /* global Clipboard, anchors */ -!function ($) { - 'use strict'; +(function ($) { + 'use strict' $(function () { @@ -48,11 +48,23 @@ $modal.find('.modal-body input').val(recipient) }) + // Activate animated progress bar + $('.bd-toggle-animated-progress').on('click', function () { + $(this).siblings('.progress').find('.progress-bar-striped').toggleClass('progress-bar-animated') + }) + // Insert copy to clipboard button before .highlight $('.highlight').each(function () { - var btnHtml = '<div class="bd-clipboard"><span class="btn-clipboard" title="Copy to clipboard">Copy</span></div>' + var btnHtml = '<div class="bd-clipboard"><button class="btn-clipboard" title="Copy to clipboard">Copy</button></div>' $(this).before(btnHtml) - $('.btn-clipboard').tooltip() + $('.btn-clipboard') + .tooltip() + .on('mouseleave', function () { + // explicitly hide tooltip, since after clicking it remains + // focused (as it's a button), so tooltip would otherwise + // remain visible until focus is moved away + $(this).tooltip('hide') + }) }) var clipboard = new Clipboard('.btn-clipboard', { @@ -86,11 +98,11 @@ }) -}(jQuery) +}(jQuery)) ;(function () { - 'use strict'; + 'use strict' - anchors.options.placement = 'left'; + anchors.options.placement = 'left' anchors.add('.bd-content > h1, .bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5') -})(); +}()) |
