I have a poem text inserted in an HTML page. Each verse of the poem is inserted into a div with an id corresponding to the number of the verse.
My wish is as follows:
Each verse has a matching audio file and when the user clicks the play button, playback starts and the audio of the corresponding verse is played back also the background Color changes to show the current verse. Also, the current verse div must be scrolled on top of the window.
The javascript code below doesn't work as expected and it changes the color for all div and not playing the sound correctly.