-
Notifications
You must be signed in to change notification settings - Fork 3
/
autoScroll.html
75 lines (69 loc) · 2.95 KB
/
autoScroll.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jCarousel Sample</title>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery.msCarousel-min.js"></script>
<link rel="stylesheet" type="text/css" href="css/mscarousel.css" />
<style type="text/css">
body {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
}
.box{width:300px; height:200px; text-align:center; background:#000; border-right:1px solid #c3c3c3; color:#FFFFFF}
.box h1{color:#f2f2f2; margin:0; padding:80px 0 0 0;}
.message{display:none; position:relative; top:0; left:0;}
.mstoplinks{padding:3px; border-bottom:2px solid #c3c3c3;}
.mstoplinks a, .mstoplinks a:visited{color:#003366; text-decoration:none; border-right:1px solid #c3c3c3; padding:0 10px}
.mstoplinks a.active, .mstoplinks a.active:visited{color:#003366; text-decoration:none; border-right:1px solid #c3c3c3; padding:0 10px;border-bottom:1px solid #c3c3c3; border-left:1px solid #c3c3c3; }
.version{font-size:12px; color:#EE3C95;}
</style>
</head>
<body>
<div style="clear:both" class="mstoplinks">
<p><a href="index.html">Normal - Horizontal & Vertical</a> <a href="carousel-hidden-feature.html">Hidden Feature</a> <a href="autoScroll.html" class="active">Auto Scroll</a> <a href="carousel-nested.html">Nested Carousel</a> <a href="carousel-with-number.html">Carousel with number</a> <a href="gallery.html">Carousel - Big Image Gallery</a> <a href="http://www.marghoobsuleman.com/jquery-ms-carousel">Help</a></p>
</div>
<h1>jQuery Carousel - Auto Scroll <sup id="ver" class="version"></sup></h1>
<div id="carouseldiv" style="border:2px solid #c3c3c3; background-color:#FFFFFF">
<div class="box">
<h1>1</h1>
</div>
<div class="box">
<h1>2</h1>
</div>
<div class="box">
<h1>3</h1>
</div>
<div class="box">
<h1>4</h1>
</div>
</div>
<div style="clear:both; padding:10px; border-bottom:1px solid #c3c3c3; margin-bottom:10px;">
<input name="pause" id="pause" type="button" value="Pause" /> <input name="play" id="play" type="button" value="Play" style="display:none" /> <br /><br />
</div>
<script type="text/javascript">
$(document).ready(function() {
var counter = $("#carouseldiv div.box").length;
try {
var oHandlerHorizontal = $("#carouseldiv").msCarousel({boxClass:'div.box', width:300, height:200, scrollSpeed:500, autoSlide:2000}).data("msCarousel");
$("#play").click(function() {
oHandlerHorizontal.play();
$("#play").hide();
$("#pause").show();
});
$("#pause").click(function() {
oHandlerHorizontal.pause();
$("#play").show();
$("#pause").hide();
});
//no use
$("#ver").html("v"+oHandlerHorizontal.getVersion());
} catch(e) {
alert(e);
alert(e.message);
}
})
</script>
</body>
</html>