-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery_demo.html
61 lines (58 loc) · 1.78 KB
/
jquery_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
<!DOCTYPE html>
<html>
<head>
<meta name="author" content="hyc">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuery的轮播图示例代码</title>
<link type="text/css" rel="stylesheet" href="css/reset.css"/>
<link type="text/css" rel="stylesheet" href="css/slider.css"/>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<div class="sliderContainer">
<div id="sliderSwap">
<ul id="sliderList" class="items">
<li><a><img src="img/1.jpg" alt="测试图片1"></a></li>
<li><a><img src="img/2.jpg" alt="测试图片2"></a></li>
<li><a><img src="img/3.jpg" alt="测试图片3"></a></li>
<li><a><img src="img/4.jpg" alt="测试图片4"></a></li>
<li><a><img src="img/5.jpg" alt="测试图片5"></a></li>
</ul>
</div>
</div>
<div class="sliderContainer">
<div id="test">
<ul class="items">
<li><a><img src="img/1.jpg" alt="测试图片1"></a></li>
<li><a><img src="img/2.jpg" alt="测试图片2"></a></li>
<li><a><img src="img/3.jpg" alt="测试图片3"></a></li>
</ul>
</div>
</div>
<script type="text/javascript" src="js/hycSlider-jquery.js"></script>
<script type="text/javascript">
jQuery(function($){
$('.sliderContainer').hycSlide({
mainCell: "#sliderSwap ul",
animationType:"slide",
autoPlay: true,
isClickHidden:false,
isCircleHidden:false,
height:640,
startIndex: 10
});
$('.sliderContainer').hycSlide({
mainCell: "#test ul",
animationType:"fade",
autoPlay: true,
isClickHidden:false,
width:320,
height:480,
startIndex: 1,
delay: 1,
duration:0.8
});
});
</script>
</body>
</html>