Skip to content

Commit a1ff0d0

Browse files
committed
Merge pull request coffeescript-cookbook#35 from MatthieuA/master
Should be currentTarget instead of 'target'
2 parents 4a60d85 + 063ec7a commit a1ff0d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapters/jquery/callback-bindings-jquery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ ->
1616
@products = []
1717

1818
$('.product').click (event) =>
19-
@add $(event.target).attr 'id'
19+
@add $(event.currentTarget).attr 'id'
2020

2121
add: (product) ->
2222
@products.push product

0 commit comments

Comments
 (0)