You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this task we assume that all elements with `data-tooltip`have only text inside. No nested tags (yet).
21
+
في هذه المهمة نفترض أن جميع العناصر مع `data-tooltip`لديها نص فقط بداخلها. لا توجد علامات متداخلة (بعد).
22
22
23
-
Details:
23
+
التفاصيل:
24
24
25
-
-The distance between the element and the tooltip should be`5px`.
26
-
-The tooltip should be centered relative to the element, if possible.
27
-
-The tooltip should not cross window edges. Normally it should be above the element, but if the element is at the page top and there's no space for the tooltip, then below it.
28
-
-The tooltip content is given in the `data-tooltip` attribute. It can be arbitrary HTML.
25
+
-يجب أن يكون المسافة بين العنصر والتلميح`5px`.
26
+
-يجب أن يكون التلميح مركزًا بالنسبة للعنصر ، إذا كان ذلك ممكنًا.
27
+
-يجب ألا يتجاوز التلميح حواف النافذة. عادةً ما يكون فوق العنصر ، ولكن إذا كان العنصر في أعلى الصفحة ولا يوجد مساحة للتلميح ، فأدناه.
28
+
-يتم إعطاء محتوى التلميح في سمة `data-tooltip`. يمكن أن يكون HTML تعسفيًا.
29
29
30
-
You'll need two events here:
31
-
-`mouseover`triggers when a pointer comes over an element.
32
-
-`mouseout`triggers when a pointer leaves an element.
30
+
ستحتاج إلى حدثين هنا:
31
+
-يُطلق الحدث `mouseover`عندما يأتي مؤشر فوق عنصر.
32
+
-يُطلق الحدث `mouseout`عندما يغادر المؤشر عنصرًا.
33
33
34
-
Please use event delegation: set up two handlers on `document`to track all "overs" and "outs" from elements with`data-tooltip`and manage tooltips from there.
34
+
يرجى استخدام تفويض الحدث: قم بإعداد معالجين على `document`لتتبع جميع "overs" و "outs" من العناصر مع`data-tooltip`وإدارة التلميحات من هناك.
35
35
36
-
After the behavior is implemented, even people unfamiliar with JavaScript can add annotated elements.
36
+
بعد تنفيذ السلوك ، يمكن حتى للأشخاص غير الملمين بـ JavaScript إضافة عناصر مُلحقة.
0 commit comments