-3
o Daniel, last week suggested an audio Function, which met perfectly what I wanted. It turns out I need to insert more audios. Dai includes a #audio3 and I made the changes in Function. The result is not expected, IE, I’m playing in #audio3, the #audio2 continues... Sorry, I tried to change Function, but I’m not succeeding.
<!--function do audio -->
<script>
$(function(){
$("#audio1").on('play', function(){
var pe = $("#audio2").get(0);
var pe = $("#audio3").get(0);
if(pe.paused == false)
pe.pause();
});
$("#audio2").on('play', function(){
var pe = $("#audio1").get(0);
var pe = $("#audio3").get(0);
if(pe.paused == false)
pe.pause();
});
$("#audio3").on('play', function(){
var pe = $("#audio1").get(0);
var pe = $("#audio2").get(0);
if(pe.paused == false)
pe.pause();
});
});
</script>