Skip to content

Commit 4635ea5

Browse files
committed
translate task javascript-tutorial#2
1 parent 27cef74 commit 4635ea5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The solution has two parts.
1+
الحل له جزأين.
22

3-
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.
3+
1. قم بلف كل عنوان عقدة شجرة في `<span>`. ثم يمكننا تصميم CSS عليها على `:hover` والتعامل مع النقرات بالضبط على النص ، لأن عرض `<span>` هو بالضبط عرض النص (على عكس بدونه).
4+
2. قم بتعيين معالج لعقدة الجذر `tree` وتعامل مع النقرات على تلك العناوين `<span>`.

2-ui/2-events/03-event-delegation/2-sliding-tree/task.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ importance: 5
22

33
---
44

5-
# Tree menu
5+
# قائمة الشجرة
66

7-
Create a tree that shows/hides node children on click:
7+
قم بإنشاء شجرة تعرض / تخفي عقد الأطفال عند النقر:
88

99
[iframe border=1 src="solution"]
1010

11-
Requirements:
11+
المتطلبات:
1212

13-
- Only one event handler (use delegation)
14-
- A click outside the node title (on an empty space) should not do anything.
13+
- معالج واحد فقط للحدث (استخدم التفويض)
14+
- يجب ألا يؤدي النقر خارج عنوان العقدة (على مساحة فارغة) إلى أي شيء.

0 commit comments

Comments
 (0)