forked from kokarn/Cloud-Carousel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
53 lines (46 loc) · 2.13 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cloud Carousel Demo</title>
<!-- You can load the jQuery library from the Google Content Network.
Probably better than from your own server. -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!-- Load the CloudCarousel JavaScript file -->
<script src="cloud-carousel.js"></script>
<script>
$(document).ready(function(){
// This initialises carousels on the container elements specified, in this case, carousel1.
$("#carousel1").CloudCarousel({
buttonLeft: $("#left-but"),
buttonRight: $("#right-but"),
altBox: $("#alt-text"),
titleBox: $("#title-text"),
autoRotate: 'right',
bringToFront: true,
reflHeight: 50,
autoRotateDelay: 3000,
reflGap: 2
});
});
</script>
</head>
<body>
<!-- This is the container for the carousel. -->
<div id = "carousel1" style="width:600px; height:550px;background:#000;overflow:scroll;">
<!-- All images with class of "cloudcarousel" will be turned into carousel items -->
<!-- You can place links around these images -->
<img class="cloudcarousel" src="generic_image.jpg" alt="Flag 1 Description" title="Flag 1 Title">
<img class="cloudcarousel" src="generic_image.jpg" alt="Flag 2 Description" title="Flag 2 Title">
<img class="cloudcarousel" src="generic_image.jpg" alt="Flag 3 Description" title="Flag 3 Title">
<img class="cloudcarousel" src="generic_image.jpg" alt="Flag 4 Description" title="Flag 4 Title">
<img class="cloudcarousel" src="generic_image.jpg" alt="Flag 5 Description" title="Flag 5 Title">
</div>
<!-- Define left and right buttons. -->
<input id="left-but" type="button" value="Left">
<input id="right-but" type="button" value="Right">
<!-- Define elements to accept the alt and title text from the images. -->
<p id="title-text"></p>
<p id="alt-text"></p>
</body>
</html>