-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
38 lines (30 loc) · 1.48 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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Smooth scroller</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
</head>
<body>
<h1 id="heading">
Smooth scrolling Javascript effect
</h1>
<nav>
<a href="#" onclick="smoothScroller.scrollDown('one'); return false;"> section 1</a>
<a href="#" onclick="smoothScroller.scrollDown('two'); return false;"> section 2</a>
<a href="#" onclick="smoothScroller.scrollDown('three'); return false;"> section 3</a>
<a href="#" onclick="smoothScroller.scrollDown('four'); return false;"> section 4</a>
</nav>
<div id="one" class="box">Section one</div>
<a href="#" onclick="smoothScroller.scrollUp('heading'); return false;"> SCROLL TO TOP</a>
<div id="two" class="box">Section two</div>
<a href="#" onclick="smoothScroller.scrollUp('heading'); return false;"> SCROLL TO TOP</a>
<div id="three" class="box">Section three</div>
<a href="#" onclick="smoothScroller.scrollUp('heading'); return false;"> SCROLL TO TOP</a>
<div id="four" class="box">Section four</div>
<a href="#" onclick="smoothScroller.scrollUp('heading'); return false;"> SCROLL TO TOP</a>
<script src="./scroll.js"></script>
</body>
</html>