summaryrefslogtreecommitdiffstats
path: root/public/regform.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/regform.js')
-rw-r--r--public/regform.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/public/regform.js b/public/regform.js
new file mode 100644
index 0000000..bcea7fa
--- /dev/null
+++ b/public/regform.js
@@ -0,0 +1,14 @@
+document.addEventListener("DOMContentLoaded", function() {
+ for (let details of document.getElementsByClassName('song-details')) {
+ details.classList.add('collapsed');
+ };
+
+ for (let toggler of document.getElementsByClassName('add-song-button')) {
+ toggler.onclick = function() {
+ this.style.display = "none";
+ let n = toggler.dataset.songNumber;
+ let details = document.getElementById('song-' + n + '-details');
+ details.classList.remove('collapsed');
+ }
+ };
+});