jquery audio play on button click

Solutions on MaxInterview for jquery audio play on button click by the best coders in the world

showing results for - "jquery audio play on button click"
Alice
23 May 2020
1$('.btn').click(function() {
2  var audio = new Audio("sounds/" + $(this).attr('id') + ".mp3");
3  audio.play();
4});
5