Skip to content

Commit 718d9df

Browse files
committed
taskui
1 parent fe571b3 commit 718d9df

File tree

6 files changed

+21
-211
lines changed

6 files changed

+21
-211
lines changed

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/hoverIntent.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
class HoverIntent {
42

53
constructor({

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/index.html

-37
This file was deleted.

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/style.css

-38
This file was deleted.

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/test.js

-98
This file was deleted.

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/source.view/hoverIntent.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
// Here's a brief sketch of the class
42
// with things that you'll need anyway
53
class HoverIntent {
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,24 @@
1-
<!doctype html>
2-
<html>
1+
<link rel="stylesheet" href="style.css">
2+
<script src="hoverIntent.js"></script>
33

4-
<head>
5-
<meta charset="UTF-8">
6-
<link rel="stylesheet" href="style.css">
7-
<script src="hoverIntent.js"></script>
8-
<script src="https://en.js.cx/test/libs.js"></script>
9-
<script src="test.js"></script>
10-
</head>
4+
<div id="elem" class="clock">
5+
<span class="hours">12</span> :
6+
<span class="minutes">30</span> :
7+
<span class="seconds">00</span>
8+
</div>
119

12-
<body>
10+
<div id="tooltip" hidden>Tooltip</div>
1311

14-
<div id="elem" class="clock">
15-
<span class="hours">12</span> :
16-
<span class="minutes">30</span> :
17-
<span class="seconds">00</span>
18-
</div>
19-
20-
<div id="tooltip" hidden>Tooltip</div>
21-
22-
<script>
23-
new HoverIntent({
24-
elem,
25-
over() {
26-
tooltip.style.left = elem.getBoundingClientRect().left + 5 + 'px';
27-
tooltip.style.top = elem.getBoundingClientRect().bottom + 5 + 'px';
28-
tooltip.hidden = false;
29-
},
30-
out() {
31-
tooltip.hidden = true;
32-
}
33-
});
34-
</script>
35-
36-
</body>
37-
</html>
12+
<script>
13+
new HoverIntent({
14+
elem,
15+
over() {
16+
tooltip.style.left = elem.getBoundingClientRect().left + 5 + 'px';
17+
tooltip.style.top = elem.getBoundingClientRect().bottom + 5 + 'px';
18+
tooltip.hidden = false;
19+
},
20+
out() {
21+
tooltip.hidden = true;
22+
}
23+
});
24+
</script>

0 commit comments

Comments
 (0)