forked from p-m-p/slider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
186 lines (156 loc) · 6.71 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Adaptor :: jQuery content slider</title>
<link href='http://fonts.googleapis.com/css?family=Aldrich' rel='stylesheet'>
<link href="css/screen.css" rel="stylesheet">
<script src="js/lib/modernizr.min.js"></script>
</head>
<body>
<div id="page">
<section>
<header>
<hgroup>
<h1>Adaptor</h1>
<h2>jQuery content slider</h2>
</hgroup>
</header>
<div id="viewport-shadow">
<a href="#" id="prev" title="go to the next slide"></a>
<a href="#" id="next" title="go to the next slide"></a>
<div id="viewport">
<div id="box">
<figure class="slide">
<img src="img/the-battle.jpg">
</figure>
<figure class="slide">
<img src="img/hiding-the-map.jpg">
</figure>
<figure class="slide">
<img src="img/theres-the-buoy.jpg">
</figure>
<figure class="slide">
<img src="img/finding-the-key.jpg">
</figure>
<figure class="slide">
<img src="img/lets-get-out-of-here.jpg">
</figure>
</div>
</div>
<div id="time-indicator"></div>
</div>
<footer>
<nav class="slider-controls">
<ul id="controls">
<li><a class="goto-slide current" href="#" data-slideindex="0"></a></li>
<li><a class="goto-slide" href="#" data-slideindex="1"></a></li>
<li><a class="goto-slide" href="#" data-slideindex="2"></a></li>
<li><a class="goto-slide" href="#" data-slideindex="3"></a></li>
<li><a class="goto-slide" href="#" data-slideindex="4"></a></li>
</ul>
</nav>
</footer>
</section>
<aside id="effect-switcher">
<h2>Select effect</h2>
<ul id="effect-list">
<li><a href="#" class="effect current" data-fx="scrollVert3d">Vertical 3D scroll</a></li>
<li><a href="#" class="effect" data-fx="scrollHorz3d">Horizontal 3D scroll</a></li>
<li><a href="#" class="effect" data-fx="tile3d">3D tiles<span class="new-effect">new!</span></a></li>
<li><a href="#" class="effect" data-fx="tile">2D tiles<span class="new-effect">new!</span></a></li>
<li><a href="#" class="effect" data-fx="scrollVert">Vertical scroll</a></li>
<li><a href="#" class="effect" data-fx="scrollHorz">Horizontal scroll</a></li>
<li><a href="#" class="effect" data-fx="blindLeft">Blind left</a></li>
<li><a href="#" class="effect" data-fx="blindDown">Blind down</a></li>
<li><a href="#" class="effect" data-fx="fade">Fade</a></li>
</ul>
</aside>
<footer id="credits">
<p>Created and maintained by <a href="http://www.philparsons.co.uk">Phil Parsons</a> | Images courtesy of the awesome <a href="http://www.davehillphoto.com/">Dave Hill</a></p>
</footer>
</div>
<script src="//code.jquery.com/jquery-1.7.2.min.js"></script>
<script>window.jQuery || document.write('<script src="js/lib/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/box-slider.jquery.js"></script>
<script src="js/effects/box-slider-fx-scroll-3d.js"></script>
<script src="js/effects/box-slider-fx-fade.js"></script>
<script src="js/effects/box-slider-fx-scroll.js"></script>
<script src="js/effects/box-slider-fx-blinds.js"></script>
<script src="js/effects/box-slider-fx-carousel-3d.js"></script>
<script src="js/effects/box-slider-fx-tile-3d.js"></script>
<script>
$(function () {
var $box = $('#box')
, $indicators = $('.goto-slide')
, $effects = $('.effect')
, $timeIndicator = $('#time-indicator')
, slideInterval = 5000
, effectOptions = {
'blindLeft': {blindCount: 15}
, 'blindDown': {blindCount: 15}
, 'tile3d': {tileRows: 6, rowOffset: 80}
, 'tile': {tileRows: 6, rowOffset: 80}
};
// This function runs before the slide transition starts
var switchIndicator = function ($c, $n, currIndex, nextIndex) {
// kills the timeline by setting it's width to zero
$timeIndicator.stop().css('width', 0);
// Highlights the next slide pagination control
$indicators.removeClass('current').eq(nextIndex).addClass('current');
};
// This function runs after the slide transition finishes
var startTimeIndicator = function () {
// start the timeline animation
$timeIndicator.animate({width: '680px'}, slideInterval);
};
// initialize the plugin with the desired settings
$box.boxSlider({
speed: 1000
, autoScroll: true
, timeout: slideInterval
, next: '#next'
, prev: '#prev'
, pause: '#pause'
, effect: 'scrollVert3d'
, onbefore: switchIndicator
, onafter: startTimeIndicator
});
startTimeIndicator(); // start the time line for the first slide
// Paginate the slides using the indicator controls
$('#controls').on('click', '.goto-slide', function (ev) {
$box.boxSlider('showSlide', $(this).data('slideindex'));
ev.preventDefault();
});
// This is for demo purposes only, kills the plugin and resets it with
// the newly selected effect FIXME clean this up!
$('#effect-list').on('click', '.effect', function (ev) {
var $effect = $(this)
, fx = $effect.data('fx')
, extraOptions = effectOptions[fx];
$effects.removeClass('current');
$effect.addClass('current');
switchIndicator(null, null, 0, 0);
if (extraOptions) {
$.each(extraOptions, function (opt, val) {
$box.boxSlider('option', opt, val);
});
}
$box.boxSlider('option', 'effect', $effect.data('fx'));
ev.preventDefault();
});
});
</script>
<!-- ---------------- do not copy below this line !! ------------------- -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10142508-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>