Skip to content

Instantly share code, notes, and snippets.

@funador
Created January 20, 2019 19:43
Show Gist options
  • Save funador/4a7d1a58c859928d4e815bb1d7591c26 to your computer and use it in GitHub Desktop.
Save funador/4a7d1a58c859928d4e815bb1d7591c26 to your computer and use it in GitHub Desktop.
const attachListeners = () => {
$('#add-todo').submit(handlers.addHandler)
$('.collection').on('click', '.delete', handlers.deleteHandler)
$('.collection').on('click', '.save', handlers.updateTextHandler)
$('.collection').on('submit', 'form', handlers.updateTextHandler)
$('.collection').on('click', '.edit', handlers.editTextHandler)
$('.collection').on('click', '.done', handlers.updateDoneHandler)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment