summaryrefslogtreecommitdiffstats
path: root/public/regform.js
blob: 42bbd584d64e72fae1d26c239680bd102011c5e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$(function() {
  var num_members = 0;
  var num_songs = 0;

  $('#add-member-button').click(function(event) {
    num_members += 1;
    $.get('member/new/' + num_members, function(data) {
      $('#form-members').append(data);
    });
  });

  $('#add-song-button').click(function(event) {
    num_songs += 1;
    $.get('song/new/' + num_songs, function(data) {
      $('#form-songs').append(data);
    });
  });

});