-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
48 lines (47 loc) · 1.71 KB
/
index.html
File metadata and controls
48 lines (47 loc) · 1.71 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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Jquery Scrolll</title>
<style type="text/css">
#top { background: #ccc; height: 1000px; }
#bottom { background: #000; color: #fff; height: 100px; }
.scroll-to-top-wrap { cursor: pointer; position: fixed; top: 20px; right: 30px; }
.scroll-to-top-wrap { background: #fff; border: 1px solid #ddd; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; color: #000; padding: 10px; text-align: center;}
</style>
</head>
<body>
<div id="wrap">
<h1>jQuery Scrolll </h1>
<a href="#bottom" class="scroll">Scroll to bottom section</a>
<div id="top">
<h1>Top</h1>
<h3>Options</h3>
<div id="options">
<pre>
<code>
//all optional and overridable
var defaults = {
duration: 1000, //the duration of the scroll
scrollToTop: true, //creates scroll to top item when true
appendScrollTo: 'body', //item to append Scroll to top item
scrollToTopText: 'Top', //Text in Scroll to top item
scrollToTopStart: 50, //pixels from top where scroll to top will unhide. Set to 0 to always show
fadeInDuration: 100, //duration of the fading in of scroll to top
fadeOutDuration: 0 //duration of the fading out of scroll to top
}
</code>
</pre>
</div>
</div>
<div id="bottom">Bottom</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="jquery.scrolll.js"></script>
<script>
jQuery(function($){
$('.scroll').scrolll();
});
</script>
</body>
</html>