Skip to content

Instantly share code, notes, and snippets.

@kaddopur
Created May 27, 2012 18:03
Show Gist options
  • Save kaddopur/2815293 to your computer and use it in GitHub Desktop.
Save kaddopur/2815293 to your computer and use it in GitHub Desktop.
CoffeeScript call by value hack
for child in children
$('#list').append("<li>#{child.name}</li>").bind 'click', do =>
tmp = child.id
-> check(tmp)
# always check the id of last child
for child in children
$('#list').append("<li>#{child.name}</li>").bind 'click', => check(child.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment