Second City Sounds

Second City Sounds

Birmingham has a rich music history, so why is it overlooked? Now, the title of this piece might be the first point of contention… For me, Birmingham is the second city despite the claims from the Mancs (sorry). Now my apology to the lovely people of Manchester is...
document.addEventListener('DOMContentLoaded', function() { // Select all audio modules with the custom class var audioModules = document.querySelectorAll('.custom-audio-module'); audioModules.forEach(function(module, index) { // Create a container for the counter var counterContainer = document.createElement('div'); counterContainer.classList.add('counter-container'); counterContainer.innerHTML = '0'; // Append the counter container to the module module.appendChild(counterContainer); // Get the audio element var audio = module.querySelector('audio'); // Initialize the counter var counter = 0; // Add play event listener to the audio element audio.addEventListener('play', function() { counter++; document.getElementById('audio-counter-' + index).textContent = counter; }); }); });