From 6f1405350b4b8b47c042631845a99f0f4e43e86e Mon Sep 17 00:00:00 2001 From: Alexander Kavon Date: Tue, 2 Dec 2025 18:49:03 -0500 Subject: create repo, add website, rapbot files --- rapbot/play.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 rapbot/play.js (limited to 'rapbot/play.js') diff --git a/rapbot/play.js b/rapbot/play.js new file mode 100755 index 0000000..6861d31 --- /dev/null +++ b/rapbot/play.js @@ -0,0 +1,27 @@ +$(document).ready(function() { + + var allAudio = $('audio'); + + function pauseAllAudio() { + allAudio.each(function() { + var a = $(this).get(0); + a.pause(); + a.currentTime = 0; + }); + }; + + $(".play").click(function() { + var tune = $(".current").attr("id"); + var realtune = $("#"+tune)[0]; + realtune.play(); + }); + + $(".next").click(function() { + pauseAllAudio(); + }); + + $(".prev").click(function() { + pauseAllAudio(); + }); + +}); -- cgit v1.2.3