-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
63 lines (53 loc) · 1.25 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!doctype html>
<html>
<head>
<title>Garden Demo</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="wrapper">
<div class="content" id="jessica">
<div class="abs" data-x="100" data-y="120">
<div class="tooltip">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, praesentium nam est exceptur.
<a href="http://linux4hope.org">l4h</a>
</p>
</div>
</div>
<div class="abs" data-x="300" data-y="40">
<div class="tooltip">
<blockquote>
<em>
This is too dope D:
</em>
</blockquote>
<p style="text-align:right"> — Jaylen Wimbish</p>
</div>
</div>
</div>
</div>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
$(
function () {
$(".tooltip").hide();
$(".abs").each( function(n, e) {
console.log([n,e]);
var me = $(e);
var left = me.data('x');
var top = me.data('y');
me.css( {
'left' : left + 'px',
'top' : top + 'px'
})
});
$(".abs").hover( function () {
$($(this).find(".tooltip")[0]).show();
}, function() {
$($(this).find(".tooltip")[0]).hide();
} );
}
);
</script>
</body>
</html>