JSFiddle - React, Tailwind, and code Playground

by Suresh Pattu

HTML

<html>
    <body>
        <div id="container">
            <button id="play">Play Music</button>
        </div>
    </body>
</html>

JavaScript

$('document').ready(function () {

$('#play').click(function(){    
var audio = {};
audio["walk"] = new Audio();
audio["walk"].src = "http://www.rangde.org/static/bell-ring-01.mp3"
audio["walk"].addEventListener('load', function() {
    audio["walk"].play();
});
     }); 
});