Skip to content

Instantly share code, notes, and snippets.

@himelnagrana
Last active September 2, 2021 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save himelnagrana/357274914767f2aac6c665a03408e5ec to your computer and use it in GitHub Desktop.
Save himelnagrana/357274914767f2aac6c665a03408e5ec to your computer and use it in GitHub Desktop.
Applaud Sound Play
<html lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var audioElement = document.createElement("audio");
audioElement.setAttribute("src", "https://www.soundjay.com/human/sounds/applause-01.mp3");
audioElement.addEventListener("ended", function () { audioElement.currentTime = 0; }, false);
$("#play").click(function () {
audioElement.play();
});
});
</script>
</head>
<body>
<button id="play">Play</button>
<div style="position: static; width: 1020px; height: auto;">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeu7ca5mN9vlX2ZmJuewpRiGprQjp5dRau7JR2oglVoLD2vLw/viewform?embedded=true" width="640" height="1469" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment