回答編集履歴
1
修正
answer
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
// 要素を追加するたびに click イベントハンドラを仕込むのではなく .on() を活用
|
18
18
|
$(document).on('click', '.delete', function(){
|
19
19
|
// 削除する要素はイベントのターゲットから parent で辿る
|
20
|
-
$(this).parent(
|
20
|
+
$(this).parent().remove();
|
21
21
|
});
|
22
22
|
});
|
23
23
|
```
|