Created
May 27, 2012 18:03
-
-
Save kaddopur/2815293 to your computer and use it in GitHub Desktop.
CoffeeScript call by value hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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