-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
56 lines (50 loc) · 960 Bytes
/
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
51
52
53
54
55
56
<!DOCTYPE html>
<title>D3D3CONF</title>
<body>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
html, body, iframe {
width: 100%;
height: 100%;
margin: 0;
border: 0;
padding: 0;
overflow: hidden;
}
iframe {
position: absolute;
}
</style>
<iframe id="one"></iframe>
<iframe id="two"></iframe>
<script>
var pieces = [
"1.html",
"2.html",
"3.html",
"quovadis.html"
];
var front = d3.select("#one"),
back = d3.select("#two"),
tmp,
i = 0;
(function show() {
front
.attr("src", pieces[i])
.transition()
.duration(2000)
.style("opacity", 1);
back
.transition()
.duration(2000)
.style("opacity", 0)
.each("end", function() {
d3.select(this).attr("src", "");
});
tmp = front;
front = back;
back = tmp;
i = (i + 1) % pieces.length;
setTimeout(show, 20000);
})();
</script>