Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2019-05-05 18:10:33 +0300
committerJohann-S <johann.servoire@gmail.com>2019-05-05 18:45:39 +0300
commit45a1954740b27a710c7aedd03192aa3c95f435f6 (patch)
treeaff12ac6b98a6cd1cbceffd19f1bf395a6490589 /site
parentf5599d0a04a8f691e961a2f9e462917556974b20 (diff)
fix progress bar animation, remove forEach not needed currently
Diffstat (limited to 'site')
-rw-r--r--site/static/docs/4.3/assets/js/src/application.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/site/static/docs/4.3/assets/js/src/application.js b/site/static/docs/4.3/assets/js/src/application.js
index 66b1d09eb0..dfbced4136 100644
--- a/site/static/docs/4.3/assets/js/src/application.js
+++ b/site/static/docs/4.3/assets/js/src/application.js
@@ -83,16 +83,15 @@
}
// Activate animated progress bar
- makeArray(document.querySelectorAll('.bd-toggle-animated-progress > .progress-bar-striped'))
- .forEach(function (progressBar) {
- progressBar.addEventListener('click', function () {
- if (progressBar.classList.contains('progress-bar-animated')) {
- progressBar.classList.remove('progress-bar-animated')
- } else {
- progressBar.classList.add('progress-bar-animated')
- }
- })
+ var btnToggleAnimatedProgress = document.querySelector('.bd-toggle-animated-progress')
+ if (btnToggleAnimatedProgress) {
+ btnToggleAnimatedProgress.addEventListener('click', function () {
+ btnToggleAnimatedProgress.parentNode
+ .querySelector('.progress-bar-striped')
+ .classList
+ .toggle('progress-bar-animated')
})
+ }
// Insert copy to clipboard button before .highlight
var btnHtml = '<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>'