summaryrefslogtreecommitdiffstats
path: root/public/regform.js
blob: 332557da19f3a9c72e2fed00bb6eb4090b4dc525 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.classList.remove('collapsed');
    toggler.onclick = function() {
      this.style.display = "none";
      let n = toggler.dataset.songNumber;
      let details = document.getElementById('song-' + n + '-details');
      details.classList.remove('collapsed');
    }
  };
});