-
Notifications
You must be signed in to change notification settings - Fork 3
/
Example.html
50 lines (50 loc) · 1.22 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Example GoScroll.js</title>
<meta charset="utf-8">
<script type="text/javascript" src="GoScroll.js"></script>
</head>
<body>
<h1>Example GoScroll.js</h1>
<br><br>
<button data-scroll-go="div">
Go Middle
</button>
<br><br>
<header style="height: 800px;background-color: green;color: black;font-size: 200px;text-align: center;">
here is header
</header>
<br><br>
<button data-scroll-go="footer">
Go Footer
</button>
<br><br>
<div style="height: 800px;background-color: blue;color: black;font-size: 200px;text-align: center;">
here is middle
</div>
<br><br>
<footer style="height: 800px;background-color: yellow;color: black;font-size: 200px;text-align: center;">
here is footer
</footer>
<br><br>
<button data-scroll-go="header">
Go Header
</button>
<br><br>
<button data-scroll-offset="-800" data-scroll-go="header">
Go Header with custom offset
<br>
(header position - (-800) = (header position + 800)
</button>
<br><br>
<button data-scroll-to="280">
Go 280px
</button>
<br><br>
<button data-scroll-to="480" onclick="goscroll.goto(this)">
Go 480 with onclick
</button>
<br><br>
</body>
</html>