JSFiddle - React, Tailwind, and code Playground

HTML

<button id="btn">
button
</button>

JavaScript

var b = document.getElementById('btn').addEventListener('click', playSound);

		var mySound;

		function sound(src) {
			this.sound = document.createElement("audio");
			this.sound.src = src;
			this.sound.setAttribute("preload", "auto");
			this.sound.setAttribute("controls", "none");
			this.sound.style.display = "none";
			document.body.appendChild(this.sound);
			this.play = function(){
				this.sound.play();
			}
			this.stop = function(){
				this.sound.pause();
			}
		} 

		function playSound(){
			mySound = new sound("p90_boltpull.wav");
			mySound.play();
		}
		
    
    //////// Pour le site 
    var elements = document.querySelectorAll('.su-spoiler-content');
    for(var i = 0; i < elements.length; i++){
    	elements[i].addEventListener('click', playSound);
    }