forked from tkahn/Smooth-Div-Scroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
92 lines (76 loc) · 3.28 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
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
<!DOCTYPE html>
<html>
<head>
<title>Demo - jQuery Smooth Div Scroll - Thomas Kahn</title>
<!-- the CSS for Smooth Div Scroll -->
<link rel="Stylesheet" type="text/css" href="css/smoothDivScroll.css" />
<!-- Styles for my specific scrolling content -->
<style type="text/css">
#makeMeScrollable
{
width:100%;
height: 330px;
position: relative;
}
/* Replace the last selector for the type of element you have in
your scroller. If you have div's use #makeMeScrollable div.scrollableArea div,
if you have links use #makeMeScrollable div.scrollableArea a and so on. */
#makeMeScrollable div.scrollableArea img
{
position: relative;
float: left;
margin: 0;
padding: 0;
/* If you don't want the images in the scroller to be selectable, try the following
block of code. It's just a nice feature that prevent the images from
accidentally becoming selected/inverted when the user interacts with the scroller. */
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
</style>
</head>
<body>
<div id="makeMeScrollable">
<img src="images/demo/field.jpg" alt="Demo image" id="field" />
<img src="images/demo/gnome.jpg" alt="Demo image" id="gnome" />
<img src="images/demo/pencils.jpg" alt="Demo image" id="pencils" />
<img src="images/demo/golf.jpg" alt="Demo image" id="golf" />
<img src="images/demo/river.jpg" alt="Demo image" id="river" />
<img src="images/demo/train.jpg" alt="Demo image" id="train" />
<img src="images/demo/leaf.jpg" alt="Demo image" id="leaf" />
<img src="images/demo/dog.jpg" alt="Demo image" id="dog" />
</div>
<!-- LOAD JAVASCRIPT LATE - JUST BEFORE THE BODY TAG
That way the browser will have loaded the images
and will know the width of the images. No need to
specify the width in the CSS or inline. -->
<!-- jQuery library - Please load it from Google API's -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<!-- jQuery UI (Custom Download containing only Widget and Effects Core)
You can make your own at: http://jqueryui.com/download -->
<script src="js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<!-- Latest version (3.1.4) of jQuery Mouse Wheel by Brandon Aaron
You will find it here: https://github.com/brandonaaron/jquery-mousewheel -->
<script src="js/jquery.mousewheel.min.js" type="text/javascript"></script>
<!-- jQuery Kinectic (1.8.2) used for touch scrolling -->
<!-- https://github.com/davetayls/jquery.kinetic/ -->
<script src="js/jquery.kinetic.min.js" type="text/javascript"></script>
<!-- Smooth Div Scroll 1.3 minified-->
<script src="js/jquery.smoothdivscroll-1.3-min.js" type="text/javascript"></script>
<!-- If you want to look at the uncompressed version you find it at
js/jquery.smoothDivScroll-1.3.js -->
<!-- Plugin initialization -->
<script type="text/javascript">
// Initialize the plugin with no custom options
$(document).ready(function () {
// None of the options are set
$("div#makeMeScrollable").smoothDivScroll({
autoScrollingMode: "onStart"
});
});
</script>
</body>
</html>