Skip to content

Instantly share code, notes, and snippets.

@rymawby
Created April 18, 2014 21:03
Show Gist options
  • Save rymawby/11064342 to your computer and use it in GitHub Desktop.
Save rymawby/11064342 to your computer and use it in GitHub Desktop.
CoffeeScript / jquery - when appending a DOM element we need to use on rather than click to teh parent div.
$('#parent-selector').on
click: ->
event.preventDefault()
".appended-item-selector"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment