Skip to content

Commit b8ee04b

Browse files
subincdevViolet-Bora-Lee
authored andcommitted
[이벤트 위임] 과제2 해답 번역 - line 4(#1311)
1 parent 02067f1 commit b8ee04b

File tree

1 file changed

+1
-1
lines changed
  • 2-ui/2-events/03-event-delegation/2-sliding-tree

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
해답은 두 파트로 나뉩니다.
22

33
1. Wrap every tree node title into `<span>`. Then we can CSS-style them on `:hover` and handle clicks exactly on text, because `<span>` width is exactly the text width (unlike without it).
4-
2. Set a handler to the `tree` root node and handle clicks on that `<span>` titles.
4+
2. 루트 노드인 `tree`에 핸들러를 추가하고 클릭 이벤트가 `<span>`으로 감싼 텍스트에만 동작하도록 합니다.

0 commit comments

Comments
 (0)