My intial click the setInterval works great but once I click on another "container" I get weird behavior. I felt that clearInterval() at the beginning of each click event would do the job but it does not. What am I missing?
$('.container #audio1 div:first').on( "click", function() {
setInterval(function() {
$("#time").html(Math.round(sound.currentTime)+ ":00 / 31:00");
}, 250);
})
$('.container #audio2 div:first').on( "click", function() {
setInterval(function() {
$("#time").html(Math.round(sound.currentTime)+ ":00 / 31:00");
}, 250);
})