forked from ginader/Accessible-Tabs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
synchedheights.html
169 lines (159 loc) · 6.98 KB
/
synchedheights.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Accessible Tabs Basic Example</title>
<meta name="author" content="Dirk Ginader">
<style type="text/css" media="screen">
/* classic slising doors example css as seen on http://www.alistapart.com/articles/slidingdoors/*/
body {
background:#fff;
margin:0;
padding:0;
color:#000;
font:x-small/1.5em Georgia,Serif;
voice-family: "\"}\""; voice-family:inherit;
font-size:small;
} html>body {font-size:small;}
.tabs {
float:left;
width:100%;
background:#DAE0D2 url("slidingdoors/bg.gif") repeat-x bottom;
font-size:93%;
line-height:normal;
}
.tabs ul.tabs-list {
margin:0;
padding:10px 10px 0;
list-style:none;
}
.tabs ul.tabs-list li {
float:left;
background:url("slidingdoors/left.gif") no-repeat left top;
margin:0;
padding:0 0 0 9px;
}
.tabs ul.tabs-list a {
float:left;
display:block;
background:url("slidingdoors/right.gif") no-repeat right top;
padding:5px 15px 4px 6px;
text-decoration:none;
font-weight:bold;
color:#765;
}
/* Commented Backslash Hack
hides rule from IE5-Mac \*/
.tabs a {float:none;}
/* End IE5-Mac hack */
.tabs a:hover {
color:#333;
}
.tabs ul.tabs-list .current {
background-image:url("slidingdoors/left_on.gif");
border-width:0;
}
.tabs ul.tabs-list .current a {
background-image:url("slidingdoors/right_on.gif");
color:#333;
padding-bottom:5px;
}
.js .tabs .current-info,
.js .tabs .accessibletabsanchor,
.js .tabs .tabhead /*position each individual tab's heading (default class .tabhead) off-screen*/ {
position:absolute;
left:-999em;
}
.js .tabs .content{
clear:both;
margin:3em 1em 1em 1em;
}
.js .tabs{
width:500px;
}
h1{
margin:1em;
}
.tabs{
padding:2em;
}
.about{
clear:both;
padding:2em;
}
</style>
<script type="text/javascript">document.documentElement.className += " js";</script>
<script src="js/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.tabs.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.syncheight.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function(){
var tabs = $(".tabs").accessibleTabs({
tabhead:'h2',
fx:"fadeIn",
syncheights:true,
savestate:true
});
$("a[href=#dummy-text]").click(function(){
tabs.showAccessibleTab(1);
});
});
</script>
</head>
<body>
<h1>Accessible Tabs Example</h1>
<div class="tabs">
<h2>some dummy text</h2>
<div class="tabbody">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam malesuada suscipit pede. Nullam ipsum lacus, varius vel, nonummy in, consequat ut, neque. </p>
<h3>Lorem ipsum</h3>
<ul>
<li>bla</li>
<li><a href="#dummy-text">bla bla</a></li>
</ul>
<p>Nullam malesuada suscipit pede. Nullam ipsum lacus, varius vel, nonummy in, consequat ut, neque. Vivamus viverra. Duis dolor arcu, lacinia sit amet, sollicitudin sed, aliquet vel, quam. Pellentesque molestie laoreet tortor. Aenean quam. Pellentesque magna metus, venenatis sit amet, congue nec, dictum in, est. Aliquam nibh. </p>
</div>
<h2 id="dummy-text">some more dummy text</h2>
<div class="tabbody">
<p>Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. </p>
<p>Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque</p>
</div>
<h2 id="anything-else">anything else</h2>
<div class="tabbody">
<p>Here could be your content</p>
</div>
</div>
<div class="tabs">
<h2>some dummy text</h2>
<div class="tabbody">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam malesuada suscipit pede. Nullam ipsum lacus, varius vel, nonummy in, consequat ut, neque. </p>
<h3>Lorem ipsum</h3>
<ul>
<li>bla</li>
<li><a href="#dummy-text">bla bla</a></li>
</ul>
<p>Nullam malesuada suscipit pede. Nullam ipsum lacus, varius vel, nonummy in, consequat ut, neque. Vivamus viverra. Duis dolor arcu, lacinia sit amet, sollicitudin sed, aliquet vel, quam. Pellentesque molestie laoreet tortor. Aenean quam. Pellentesque magna metus, venenatis sit amet, congue nec, dictum in, est. Aliquam nibh. </p>
</div>
<h2 id="dummy-text">some more dummy text</h2>
<div class="tabbody">
<p>Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. </p>
<p>Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque</p>
</div>
<h2 id="anything-else">anything else</h2>
<div class="tabbody">
<p>Here could be your content</p>
</div>
</div>
<p class="about">Want to learn more about this? <a href="http://blog.ginader.de/archives/2009/02/07/jQuery-Accessible-Tabs-How-to-make-tabs-REALLY-accessible.php">jQuery Accessible Tabs - How to make tabs REALLY accessible</a></p>
<!-- <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-299719-2");
pageTracker._initData();
pageTracker._trackPageview();
</script> -->
</body>
</html>