Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 134 lines (97 sloc) 3.431 kb
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
1 <!DOCTYPE html>
2 <html>
3 <head>
4
5 <meta content="text/html; charset=UTF-8" http-equiv="content-type">
6 <title>Tests for hiding/showing elements</title>
7
8 <style type="text/css">
9
dc192f9 Add the -pie-base-url property to all test documents to ensure they p…
Jason Johnston authored
10 html { -pie-base-url: "../build"; }
11
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
12 .section {
13 border: 1px solid #CCC;
14 padding: 2em;
15 margin: 2em;
16 }
17
18 .test {
19 padding: 2em;
20 margin: 2em 0 0;
21 width: 300px;
22 background: #CCF;
23 -webkit-border-radius: 1em;
24 -moz-border-radius: 1em;
25 border-radius: 1em;
26 -webkit-box-shadow: 0 0 5px #000;
27 -moz-box-shadow: 0 0 5px #000;
28 box-shadow: 0 0 5px #000;
29 behavior: url(../build/PIE.htc);
30 }
31
32 </style>
33
34 <script type="text/javascript">
35
36 function toggleDisplay( id ) {
37 var el = document.getElementById( id );
38 el.style.display = el.style.display === 'none' ? 'block' : 'none';
39 }
40
41 function toggleVisibility( id ) {
42 var el = document.getElementById( id );
43 el.style.visibility = el.style.visibility === 'hidden' ? 'visible' : 'hidden';
44 }
45
46 </script>
47
48 </head>
49 <body>
50
51 <h1>Tests for hiding/showing elements</h1>
52
53 <div class="section">
54 <h2>Toggle display, hidden initially</h2>
55
56 <button type="button" onclick="toggleDisplay('test1')">Toggle</button>
57
58 <div class="test" id="test1" style="display:none;">
59 Hello PIE
60 </div>
61 </div>
62
63 <div class="section">
64 <h2>Toggle display, shown initially</h2>
65
66 <button type="button" onclick="toggleDisplay('test2')">Toggle</button>
67
68 <div class="test" id="test2">
69 Hello PIE
70 </div>
71 </div>
72
73 <div class="section">
55cce89 Add tests for reacting to show/hide of ancestor elements
Jason Johnston authored
74 <h2>Toggle parent display, hidden initially</h2>
75
76 <button type="button" onclick="toggleDisplay('test3')">Toggle</button>
77
78 <div id="test3" style="display:none;">
79 <div class="test">Hello PIE</div>
80 </div>
81 </div>
82
83 <div class="section">
84 <h2>Toggle parent display, shown initially</h2>
85
86 <button type="button" onclick="toggleDisplay('test4')">Toggle</button>
87
88 <div id="test4">
89 <div class="test">Hello PIE</div>
90 </div>
91 </div>
92
93 <div class="section">
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
94 <h2>Toggle visibility, hidden initially</h2>
95
55cce89 Add tests for reacting to show/hide of ancestor elements
Jason Johnston authored
96 <button type="button" onclick="toggleVisibility('test5')">Toggle</button>
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
97
55cce89 Add tests for reacting to show/hide of ancestor elements
Jason Johnston authored
98 <div class="test" id="test5" style="visibility: hidden">
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
99 Hello PIE
100 </div>
101 </div>
102
103 <div class="section">
104 <h2>Toggle visibility, shown initially</h2>
105
55cce89 Add tests for reacting to show/hide of ancestor elements
Jason Johnston authored
106 <button type="button" onclick="toggleVisibility('test6')">Toggle</button>
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
107
55cce89 Add tests for reacting to show/hide of ancestor elements
Jason Johnston authored
108 <div class="test" id="test6">
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
109 Hello PIE
110 </div>
111 </div>
112
55cce89 Add tests for reacting to show/hide of ancestor elements
Jason Johnston authored
113 <div class="section">
114 <h2>Toggle parent visibility, hidden initially</h2>
115
116 <button type="button" onclick="toggleVisibility('test7')">Toggle</button>
117
118 <div id="test7" style="visibility: hidden">
119 <div class="test">Hello PIE</div>
120 </div>
121 </div>
122
123 <div class="section">
124 <h2>Toggle parent visibility, shown initially</h2>
125
126 <button type="button" onclick="toggleVisibility('test8')">Toggle</button>
127
128 <div id="test8">
129 <div class="test">Hello PIE</div>
130 </div>
131 </div>
132
bf3d9f2 Fix bug where css3 renderings would not get updated when the target e…
Jason Johnston authored
133 </body>
134 </html>
Something went wrong with that request. Please try again.