-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
76 lines (64 loc) · 2.36 KB
/
example.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
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>scrollbarPins example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
#scrollbarPinsContainer
{
height: 100%;
position: fixed;
right: 0;
top: 0;
z-index: 9999;
}
#scrollbarPinsContainer li
{
cursor: pointer;
list-style: none;
margin: 0;
padding: 0 3px;
position: absolute;
right: 11px;
white-space: nowrap;
}
#scrollbarPinsContainer li {
position: relative;
background: #000;
color: #eee;
height: 18px;
}
#scrollbarPinsContainer li:before {
left: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(0, 0, 0, 0);
border-left-color: #000;
border-width: 9px;
top: 50%;
margin-top: -9px;
}
</style>
</head>
<body>
<div id="content">
<h1 data-scrollbarpins='{ "id": 1, "title": "Item 1"}'>Item 1</h1>
<div style="background: hotpink;height:400px;width: 80%;"></div>
<h2 data-scrollbarpins='{ "id": 2, "title": "Item 2"}'>Item 2</h2>
<div style="background: hotpink;height:800px;width: 80%;"></div>
<h2 data-scrollbarpins='{ "id": 3, "title": "Item 3"}'>Item 3</h2>
<div style="background: hotpink;height:400px;width: 80%;"></div>
<h2 data-scrollbarpins='{ "id": 4, "title": "Item 4"}'>Item 4</h2>
<div style="background: hotpink;height:200px;width: 80%;"></div>
<h2 data-scrollbarpins='{ "id": 5, "title": "Item 5"}'>Item 5</h2>
<div style="background: hotpink;height:1000px;width: 80%;"></div>
</div>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="jquery.scrollbarpins.js"></script>
</body>
</html>