forked from funnythingz/zflickjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
127 lines (120 loc) · 4.48 KB
/
demo.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
<!Doctype html>
<head>
<meta charset="utf-8">
<title>zflickjs</title>
<meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="no">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="stylesheet" href="css/zflick.css">
<script type="text/javascript" src="zflick-1.7.js"></script>
<script type="text/javascript">
var init = function(){
new zflickjs({
id: 'zflickjs',
contents: 'zcontents',
col: 'zcol',
width: 280,
autoChange: true,
autoTimer: 4000,
lamp: 'zflickLamp',
initCallback: function(){
console.log('initCallback');
},
moveCallback: function(){
console.log(this.cur);
}
});
/**/
new zflickjs({
id: 'zflickjs2',
contents: 'zcontents2',
col: 'zcol',
width: 280,
});
new zflickjs({
id: 'zflickjs3',
contents: 'zcontents3',
col: 'zcol',
width: 280,
btn: {
prev: 'prev3',
next: 'next3'
}
});
/**/
}
//document.addEventListener('DOMContentLoaded', init, false);
window.addEventListener('load', init, false);
</script>
<style type="text/css">
#zflickLamp {
text-align:center;
margin-top: 4px;
}
#zflickLamp > div {
display: inline-block;
background-color:#aab4be;
width: 10px;
height: 10px;
margin: 0 7px;
border-radius: 12px;
}
#zflickLamp > div.cur {
background-color:#00a0dc;
}
</style>
</head>
<body>
<h1>zflickjs DEMO</h1>
<div style="width:100%; overflow: hidden; margin-bottom: 2em;">
<div id="zflickjs" style="margin: 0 auto 1em;">
<div id="zcontents" class="group contents">
<div class="zcol"><p>0</p><a href="#" class="zlink"><img src="./images/0.jpg"></a></div>
<div class="zcol"><p>1</p><a href="#" class="zlink"><img src="./images/1.jpg"></a></div>
<div class="zcol"><p>2</p><a href="#" class="zlink"><img src="./images/2.jpg"></a></div>
<div class="zcol"><p>3</p><a href="#" class="zlink"><img src="./images/3.jpg"></a></div>
<div class="zcol"><p>4</p><a href="#" class="zlink"><img src="./images/4.jpg"></a></div>
<div class="zcol"><p>5</p><a href="#" class="zlink"><img src="./images/5.jpg"></a></div>
<div class="zcol"><p>6</p><a href="#" class="zlink"><img src="./images/6.jpg"></a></div>
<div class="zcol"><p>7</p><a href="#" class="zlink"><img src="./images/7.jpg"></a></div>
<div class="zcol"><p>8</p><a href="#" class="zlink"><img src="./images/8.jpg"></a></div>
<div class="zcol"><p>9</p><a href="#" class="zlink"><img src="./images/9.jpg"></a></div>
</div>
<div id="zflickLamp"></div>
</div>
</div>
<div style="width:100%; overflow: hidden; margin-bottom: 2em;">
<div id="zflickjs2" style="margin: 0 auto 1em;">
<div id="zcontents2" class="group contents">
<div class="zcol"><a href="#" class="zlink"><img src="./images/0.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/1.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/2.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/3.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/4.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/5.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/6.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/7.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/8.jpg"></a></div>
<div class="zcol"><a href="#" class="zlink"><img src="./images/9.jpg"></a></div>
</div>
</div>
</div>
<div style="width:100%; overflow: hidden; margin-bottom: 2em;">
<div id="zflickjs3" style="margin: 0 auto 1em;">
<div id="zcontents3" class="group contents">
<div class="zcol">1. text text text text text</div>
<div class="zcol">2. ahya<br>ahya<br>ahya<br></div>
<div class="zcol">3. text text text text text</div>
<div class="zcol">4. ahya<br>ahya<br>ahya<br></div>
<div class="zcol">5. text text text text text</div>
<div class="zcol">6. ahya<br>ahya<br>ahya<br></div>
</div>
</div>
<div class="group" style="margin-top: 0.5em;">
<span id="prev3" class="zflickClickBtn" style="float: left;">prev</span>
<span id="next3" class="zflickClickBtn" style="float: right;">next</span>
</div>
</div>
</body>
</html>