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
Copy file name to clipboardExpand all lines: 2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/task.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,29 +2,29 @@ importance: 5
2
2
3
3
---
4
4
5
-
# "Smart" tooltip
5
+
# "Akıllı" tooltip
6
6
7
-
Write a function that shows a tooltip over an element only if the visitor moves the mouse *over it*, but not *through it*.
7
+
Kullanıcı fareyle bir elementin *üzerinden geçtiğinde* ancak *üzerinden geçip gitmediğinde* tooltip (ipucu) gösteren bir fonksiyon yazın.
8
8
9
-
In other words, if the visitor moves the mouse on the element and stopped -- show the tooltip. And if they just moved the mouse through fast, then no need, who wants extra blinking?
9
+
Diğer kelimelerle, eğer kullanıcı faresiyle bir ögenin üzerine gelirse ve durursa -- tooltipi göster. Ancak eğer faresiyle bu ögenin üzerinden hızlıca geçip giderse, tooltip gösterme.
10
10
11
-
Technically, we can measure the mouse speed over the element, and if it's slow then we assume that it comes "over the element" and show the tooltip, if it's fast -- then we ignore it.
11
+
Teknik olarak, bir öğenin üzerindeki fare hızını ölçebiliriz, eğer hızı yavaşsa biz bunu elementin üzerinden geçiyor kabul ederek tooltipi göstermeliyiz. Hızı fazla ise o zaman görmezden gelmeliyiz.
12
12
13
-
Make a universal object`new HoverIntent(options)`for it. With `options`:
13
+
Bunun için global obje`new HoverIntent(options)`yap. `options` (seçenekler) ile beraber:
14
14
15
-
-`elem` -- element to track.
16
-
-`over` -- a function to call if the mouse is slowly moving over the element.
17
-
-`out` -- a function to call when the mouse leaves the element (if`over`was called).
15
+
-`elem` -- Takip edilecek element.
16
+
-`over` -- Eğer fare elementin üzerinden yavaşca geçiyorsa çağırılacak fonksiyon.
17
+
-`out` -- Fare elementin üzerinden ayrıldığı zaman çağırılacak fonksiyon (eğer`over`çağırıldıysa).
18
18
19
-
An example of using such object for the tooltip:
19
+
Tooltip için böyle bir objeyi kullanmaya bir örnek:
20
20
21
21
```js
22
-
//a sample tooltip
22
+
//örnek tooltip
23
23
let tooltip =document.createElement('div');
24
24
tooltip.className="tooltip";
25
25
tooltip.innerHTML="Tooltip";
26
26
27
-
//the object will track mouse and call over/out
27
+
// mouse hareketlerini takip edecek nesne
28
28
newHoverIntent({
29
29
elem,
30
30
over() {
@@ -38,10 +38,10 @@ new HoverIntent({
38
38
});
39
39
```
40
40
41
-
The demo:
41
+
demo:
42
42
43
43
[iframe src="solution" height=140]
44
44
45
-
If you move the mouse over the "clock" fast then nothing happens, and if you do it slow or stop on them, then there will be a tooltip.
45
+
Fareyi "saat" üzerine hızlı bir şekilde hareket ettirirseniz hiçbir şey olmaz ve bunu yavaş yaparsanız veya durdurursanız, bir tooltip gösterecektir.
46
46
47
-
Please note: the tooltip doesn't "blink" when the cursor moves between the clock subelements.
47
+
Lütfen dikkat: imleç saat alt öğeleri arasında hareket ettiğinde tooltip "gelip gitmez".
0 commit comments