Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery Audio Play on button click

$('.btn').click(function() {
  var audio = new Audio("sounds/" + $(this).attr('id') + ".mp3");
  audio.play();
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #Audio #Play #button #click
ADD COMMENT
Topic
Name
3+8 =