Created
April 14, 2014 14:18
-
-
Save etianen/10652311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#your-button").click(function() { | |
// Remove the old audio tag. | |
$("#your-audio-container").find("audio").remove() | |
// Add a new audio tag in. | |
$("#your-audio-container").append($("<audio/>", { | |
src: "new-audio-file.mp3", | |
controls: true, | |
preload: true | |
})); | |
// Apply the html5media shim on legacy browsers. | |
html5media(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment