This repository has been archived by the owner on Oct 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slideshow2.html
94 lines (65 loc) · 1.48 KB
/
slideshow2.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
<head>
<meta charset="utf-8">
<script type="text/JavaScript" src="https://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<img src="" id="slide">
<img src="" id="slide2">
</body>
<script type="text/javascript">
$(document).ready(function() {
var img = new Array();
var link = new Array();
var i = 1;
var e = 0;
img[1] = "./img/slideshow/2slide1.jpg";
link[1] = ""
img[2] = "./img/slideshow/2slide2.jpg";
link[2] = ""
img[3] = "./img/slideshow/2slide3.jpg";
link[3] = ""
img[4] = "./img/slideshow/2slide4.jpg";
link[4] = ""
img[5] = "./img/slideshow/2slide5.jpg";
link[5] = ""
$("#slide").attr("src",img[1]);
setInterval(function () {
if (i < 5) {
i += 1;
} else {
i = 1;
};
if (e < 5) {
e += 1;
} else {
e = 1;
};
$("#slide2").attr("src",img[e]);
$("#slide2").show();
$("#slide").attr("src",img[i]);
$("#slide2").fadeOut(800);
//$("#slide2").animate({width:'toggle'},500);
}, 4000);
});
</script>
<style type="text/css">
body {
margin: 0 0 0 0;
padding: 0;
}
#slide {
border-radius: 5px;
position: absolute;
width: 580px;
height: 435px;
/*display: none;*/
}
#slide2 {
border-radius: 5px;
position: absolute;
width: 580px;
height: 435px;
display: none;
z-index: 1200;
}
</style>