Skip to content

Commit 063ec7a

Browse files
committed
Select currentTarget instead of the target
1 parent 4a60d85 commit 063ec7a

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)