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
|
// Activate animated progress bar
|
||||||
makeArray(document.querySelectorAll('.bd-toggle-animated-progress > .progress-bar-striped'))
|
var btnToggleAnimatedProgress = document.querySelector('.bd-toggle-animated-progress')
|
||||||
.forEach(function (progressBar) {
|
if (btnToggleAnimatedProgress) {
|
||||||
progressBar.addEventListener('click', function () {
|
btnToggleAnimatedProgress.addEventListener('click', function () {
|
||||||
if (progressBar.classList.contains('progress-bar-animated')) {
|
btnToggleAnimatedProgress.parentNode
|
||||||
progressBar.classList.remove('progress-bar-animated')
|
.querySelector('.progress-bar-striped')
|
||||||
} else {
|
.classList
|
||||||
progressBar.classList.add('progress-bar-animated')
|
.toggle('progress-bar-animated')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// Insert copy to clipboard button before .highlight
|
// 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>'
|
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