Jun 30, 2017
0
Level 1
How to use foreach loop with audio tag
I'm working with playing a playlist of audios from stored in the database with a single pause and play button. I found a nice Jquery code to use but the issue is that only the first music played
How can I make the id dynamic? for perfect function
var myAudio = document.getElementById("{{$ebeat->id}}"); function togglePlay() { return myAudio.paused ? myAudio.play() : myAudio.pause(); };Please or to participate in this conversation.