I'm having issues with jquery's on() binding function and the audio element. I have dynamically generated audio elements on my page, so I can't just do $('audio').on('ended', function(e){})
. Instead, what I do, and what works for me with every other element is create an on() event for the container that isn't dynamically generated. In this case, I do something like this:
$('.charts-container').on('ended', 'audio', function(e){}).
Which doesn't trigger the function like $('audio').on('ended'... )
does. What gives?