mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
fix progress bar animation, remove forEach not needed currently
This commit is contained in:
parent
f5599d0a04
commit
45a1954740
1 changed files with 8 additions and 9 deletions
|
@ -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>'
|
||||
|
|
Loading…
Reference in a new issue