$ -> console.log('ready.') $('#report-benchmarks').on('change', -> url = '/api/benchmark/' + $('#report-benchmarks').val() + '/tests' $.get(url, (data) -> # clear old contents from the selector $('#report-tests').empty() # add new elements to the selector addOption(test) for test in data ) ) addOption = (test) -> $('#report-tests').append( $('