-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (44 loc) · 1.38 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>6cams</title>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="js/jquery.js"></script>
<link href="css/style.css" rel="stylesheet">
<script type="text/javascript">
cams = {
"cam_1": "images/bmw.jpg",
"cam_2": "images/cart.png",
"cam_3": "images/monkey.jpg",
"cam_4": "images/man.jpg",
"cam_5": "images/woman.jpg",
"cam_6": "images/printer.png"
};
function get_cams(container, cams) {
$.each(cams, function (cam, value) {
container.append('<li><a href="#"><img width="330" height="230" id="'+cam+'" src="' + value + '" class="cam_image"></a></li>');
});
}
$(document).ready(function() {
get_cams($("#cam_container"), cams);
});
var auto_refresh = setInterval(
function() {
$.each(cams, function (cam, value) {
$('#'+cam).attr("src", (value+'?'+Math.random()));
});
}, 1000);
</script>
</head>
<body>
<div class="container">
<div class="content">
<ul class="media-grid" id="cam_container"></ul>
</div>
</div>
<!-- /container -->
</body>
</html>