Both the javascript and the HTML are changed:
Code:
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type='text/css'>
audio{
display:none;
}
</style>
<script type="text/javascript">
window.addEventListener && addEventListener('load', function(){
var snds = document.getElementsByTagName('audio'), s = snds.length, so = {},
slinks = document.getElementById('soundlinks').getElementsByTagName('a');
function playasound(e){
if(so[this.id].playing){so[this.id].sound.pause(); so[this.id].sound.currentTime = 0; so[this.id].playing = false;}
else {
for(var s in so){
if(so[s].playing){so[s].sound.pause(); so[s].sound.currentTime = 0; so[s].playing = false;}
}
so[this.id].sound.play(); so[this.id].playing = true;
}
e.preventDefault();
}
while(--s > -1){
so[slinks[s].id] = {sound: snds[s], playing: false};
slinks[s].addEventListener('click', playasound, false);
(function(s){
snds[s].addEventListener('ended', function(){so[slinks[s].id].playing = false;}, false);
})(s);
}
}, false);
</script>
</head>
<body>
<!-- sound -->
<audio id="plyr_sound_001" controls preload="auto">
<source src="mp3/002_SoundClipsfromSoundBible.com.mp3"></source>
Your Browser does not support please use (Firefox 3.5+, Chrome 3+, Opera
10.5+, Safari 4+, IE 9+) browsers.
</audio>
<!-- sound -->
<!-- sound -->
<audio id="plyr_sound_002" controls preload="auto">
<source src="mp3/003_SoundClipsfromSoundBible.com.mp3"></source>
Your Browser does not support please use (Firefox 3.5+, Chrome 3+, Opera
10.5+, Safari 4+, IE 9+) browsers.
</audio>
<!-- sound -->
<!-- sound -->
<audio id="plyr_sound_003" controls preload="auto">
<source src="mp3/004_SoundClipsfromSoundBible.com.mp3"></source>
Your Browser does not support please use (Firefox 3.5+, Chrome 3+, Opera
10.5+, Safari 4+, IE 9+) browsers.
</audio>
<!-- sound -->
<!-- sound -->
<audio id="plyr_sound_004" controls preload="auto">
<source src="mp3/004_SoundClipsfromSoundBible.com.mp3"></source>
Your Browser does not support please use (Firefox 3.5+, Chrome 3+, Opera
10.5+, Safari 4+, IE 9+) browsers.
</audio>
<!-- sound -->
<div id="soundlinks">
<a href="#" id="link_sound_001">001</a> <br />
<a href="#" id="link_sound_002">002</a> <br />
<a href="#" id="link_sound_003">003</a> <br />
<a href="#" id="link_sound_004">004</a> <br />
</div>
</body>
</html>
The browser cache may need to be cleared and/or the page refreshed to see changes.
If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks