-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
116 lines (112 loc) · 3.08 KB
/
index.html
File metadata and controls
116 lines (112 loc) · 3.08 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
crossorigin="anonymous"
></script>
<title>Sticky Elements</title>
</head>
<body>
<div class="container mt-4">
<table class="table" id="myTable">
<thead>
<tr>
<th
scope="col"
class="stickyElement"
data-stickyTopBorder="myTable"
data-stickyBottomBorder="myTable"
>
#
</th>
<th
scope="col"
class="stickyElement"
data-stickyParent="myTable"
data-stickyBottomBorder="myTable"
>
First
</th>
<th
scope="col"
class="stickyElement"
data-stickyParent="myTable"
data-stickyBottomBorder="myTable"
>
Last
</th>
<th
scope="col"
class="stickyElement"
data-stickyParent="myTable"
data-stickyBottomBorder="myTable"
>
Handle
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
<div
class="container border"
style="height: 450px; margin-top: 250px"
id="parentDiv"
>
<button
class="btn btn-success stickyElement"
data-stickyTopBorder="parentDiv"
data-stickyType="bottom"
>
Bottom Sticky Button
</button>
<button
class="btn btn-warning stickyElement"
data-stickyTopBorder="parentDiv"
data-stickyBottomBorder="parentDiv"
data-stickyType="top"
>
Top Sticky Button
</button>
</div>
<div id="observerContainer" class="container text-end mt-5"></div>
<div style="height: 2500px"> </div>
</body>
<script src="SU-TO-BO-StickyJS.js"></script>
</html>