-
Notifications
You must be signed in to change notification settings - Fork 103
/
index.html
129 lines (95 loc) · 2.39 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
<!DOCTYPE html>
<html>
<head>
<!-- META -->
<meta charset = "utf-8">
<meta name = "viewport" content = "width=device-width, minimum-scale=1, maximum-scale=1">
<meta name = "apple-mobile-web-app-capable" content = "yes" />
<style type="text/css">
.fluidHeight {
position: relative;
width: 100%;
height: 300px;
}
/*
* below 900px, switch to percentage based responsive height.
* padding of 33.333% is calculated by using the
* image ratio 300px/900px = .333 * 100% = 33.333%
*/
@media screen and (max-width: 900px) {
.fluidHeight {
height: 0;
padding: 0 0 33.333% 0;
}
}
.sliderContainer {
position: absolute;
width: 100%;
height: 100%;
}
.iosSlider {
width: 100%;
height: 100%;
background: #aaa;
}
.iosSlider .slider {
width: 100%;
height: 100%;
}
.iosSlider .slider .item {
position: relative;
top: 0;
left: 0;
max-width: 900px;
width: 100%;
height: 100%;
}
.iosSlider .slider .item img {
position: relative;
top: 0;
left: 0;
max-width: 900px;
width: 100%;
margin: 0 auto;
}
</style>
<!-- jQuery library -->
<script type="text/javascript" src = "../../../_lib/jquery-1.4.min.js"></script>
<script type="text/javascript" src = "../../../_lib/jquery.easing-1.3.js"></script>
<!-- iosSlider plugin -->
<script src = "../../../_src/jquery.iosslider.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.iosSlider').iosSlider({
snapToChildren: true,
desktopClickDrag: true,
infiniteSlider: true,
snapSlideCenter: true
});
});
</script>
<title>Ex #12: Image Slides</title>
</head>
<body>
<div class = 'fluidHeight'>
<div class = 'sliderContainer'>
<div class = 'iosSlider'>
<div class = 'slider'>
<div class = 'item'>
<img src = '../../_resources/h-slider-1.jpg' />
</div>
<div class = 'item'>
<img src = '../../_resources/h-slider-2.jpg' />
</div>
<div class = 'item'>
<img src = '../../_resources/h-slider-3.jpg' />
</div>
<div class = 'item'>
<img src = '../../_resources/h-slider-4.jpg' />
</div>
</div>
</div>
</div>
</div>
</body>
</html>