blob: 22950134e2ca8c88b4739caa22c953217cbae79b (
plain)
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
|
<html>
<head>
<style>
body {
width: 100%;
margin: 0px;
transition: transform 300ms ease;
overflow-x: hidden;
}
body.section1 {
transform: translateX(0%);
}
body.section2 {
transform: translateX(-100%);
}
section {
width: 100%;
height: 100%;
position: absolute;
}
#section1 {
left: 0px;
}
#section2 {
left: 100%;
}
.mypossie {
position:absolute;
left: -1000px;
}
</style>
</head>
<body class="section1">
<section id="section1">
<div id="assertMe1">
<p>Section 1</p>
</div>
<button id="b1" onclick="var sect = document.getElementsByTagName('body')[0]; sect.classList.add('section2'); sect.classList.remove('section1');">Show section 2</button>
</section>
<section id="section2">
<div id="assertMe2">
<p>Section 2</p>
</div>
<button id="b2" onclick="var sect = document.getElementsByTagName('body')[0]; sect.classList.add('section1'); sect.classList.remove('section2'); ">Show section 1</button>
</section>
<section class='mypossie'>out in left field!</section>
</body>
</html>
|