JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">hover here</div>

CSS

#test {
    background: black;
    color: red;
    width: 50px;
    height: 50px;
}

JavaScript

var test = new Audio("http://www.sounddogs.com/previews/25/mp3/228367_SOUNDDOGS__dr.mp3");
$('#test').hover(function() {
  test.play();
}, function() {
  test.pause();
  test.currentTime = 0;
});