Skip to content

Commit 697ec58

Browse files
Update hoverintent
1 parent 15b355a commit 697ec58

File tree

1 file changed

+14
-14
lines changed
  • 2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent

1 file changed

+14
-14
lines changed

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/task.md

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

33
---
44

5-
# "Smart" tooltip
5+
# "Akıllı" tooltip
66

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.
88

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.
1010

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.
1212

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:
1414

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).
1818

19-
An example of using such object for the tooltip:
19+
Tooltip için böyle bir objeyi kullanmaya bir örnek:
2020

2121
```js
22-
// a sample tooltip
22+
// örnek tooltip
2323
let tooltip = document.createElement('div');
2424
tooltip.className = "tooltip";
2525
tooltip.innerHTML = "Tooltip";
2626

27-
// the object will track mouse and call over/out
27+
// mouse hareketlerini takip edecek nesne
2828
new HoverIntent({
2929
elem,
3030
over() {
@@ -38,10 +38,10 @@ new HoverIntent({
3838
});
3939
```
4040

41-
The demo:
41+
demo:
4242

4343
[iframe src="solution" height=140]
4444

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.
4646

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

Comments
 (0)