jquery - Change mp3 src attribute works in Firefox, but not in Chrome -


i want switch src attribute of embedded mp3.

  <embed id="aplayer" width="10" height="10" src="audio/gong.mp3">  

js

$("#btnplay").click(function() {     if (mm==0) {     $('#aplayer').attr('src', 'audio/01.mp3');     mm = 1;     }     else {     $('#aplayer').attr('src', 'audio/gong.mp3');     mm = 0; } 

works in firefox (the new file plays), not in chrome.

is there way solve in chrome ?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -