I have 10 audio players with simple html audio tags on a html5 page. No jquery, no special audio js plugins, etc...
Does anyone has a simple script in js to pause al
$("audio").on("play", function() { var id = $(this).attr('id'); $("audio").not(this).each(function(index, audio) { audio.pause(); }); }); $("video").on("play", function() { var id = $(this).attr('id'); $("video").not(this).each(function(index, video) { video.pause(); }); });