perfettiful
3/28/2018 - 11:56 PM

Add Audio jQuery

   // Gets Link for Theme Song
    var audioElement = document.createElement("audio");
    audioElement.setAttribute("src", "Assets/captainplanet24.mp3");
    
        // Theme Button
    $("#musicControls").on("click", ".theme-button", function() {
      audioElement.play();
    }).on("click", ".pause-button", function() {
      audioElement.pause();
    });