Get help on our basic JavaScript and Algorithms Challenges. If you are posting code that is large use Gist - https://gist.github.com/ paste the link here.
thecodingaviator on master
remove A (#31157) (compare)
/*
CSS
*/
.progress {
height: 20px;
width: 0;
margin-bottom: 5px;
background-color: brown;
display: block;
transition: width 1s;
}
/*
JS
*/
window.addEventListener('DOMContentLoaded', function() {
var progress = document.querySelectorAll('.progress');
progress.forEach(function(element) {
var percentage = element.getAttribute('progress')
element.style.width = percentage + 'px';
});
});