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 = '
'