function animateProgressBars() { document.querySelectorAll('.progress-bar').forEach(bar => { const progressValue = bar.getAttribute('aria-valuenow'); bar.style.setProperty('--progress-width', progressBarWidth(progressBarValue(progressBar))); }); } document.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('.progress-bar').forEach(bar => { const width = bar.getAttribute('aria-valuenow') + '%'; bar.style.setProperty('--progress-width', width); }); });