Skip to content

Instantly share code, notes, and snippets.

@jeresig
Created August 7, 2009 20:41
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeresig/164163 to your computer and use it in GitHub Desktop.
Save jeresig/164163 to your computer and use it in GitHub Desktop.
// Slightly rewritten code from here:
// http://blog.mozilla.com/webdev/2009/08/06/html5-audio-soundboard/
$("audio").removeAttr("controls").each(function(i, audio) {
$('<button>')
.text( $(this).attr("title") )
.click(function() {
audio.play();
))
.appendTo("#doc");
});
@jlis
Copy link

jlis commented Sep 14, 2015

There's a small failure in line #8. You have to replace the first brace with a curly one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment