-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsample.html
116 lines (95 loc) · 2.46 KB
/
sample.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Example tabs</title>
<meta charset="utf-8" />
<meta name="author" content="Nicolas Hoffmann" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="https://rocssti.net/downloads/rocssti-fr.css" />
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://a11y.nicolas-hoffmann.net/tabs/js/jquery-accessible-tabs.js"></script>
<style>
/* --------------- styles for tabs -----------------------*/
.invisible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.example-tabs-tabs__list {
margin: 0;
padding: 0;
}
.example-tabs-tabs__item {
display: inline-block;
}
.example-tabs-tabs__link {
display: inline-block;
padding: 1em 2em;
background: #f2f2f2;
cursor: pointer;
color: #148297;
}
[aria-selected="true"].example-tabs-tabs__link {
color: #000;
}
.example-tabs-tabs__content {
background: #f2f2f2;
padding: 1em;
}
[aria-hidden="true"].example-tabs-tabs__content {
display: none;
}
#page {
width: 960px;
margin: 0 auto;
}
</style>
</head>
<body role="document">
<div id="page">
<h1>Tabs example</h1>
<div class="js-tabs">
<ul class="js-tablist" data-hx="h2" data-tabs-prefix-class="example-tabs">
<li class="js-tablist__item">
<a href="#id_first" id="label_id_first" class="js-tablist__link">1st tab</a>
</li>
<li class="js-tablist__item">
<a href="#id_second" id="label_id_second" class="js-tablist__link">2nd tab</a>
</li>
</ul>
<div id="id_first" class="js-tabcontent">
here the content of 1st tab
</div>
<div id="id_second" class="js-tabcontent">
here the content of 2nd tab
</div>
</div>
<br><br>
<div class="js-tabs" >
<ul class="js-tablist" data-existing-hx="h2" data-tabs-prefix-class="example-tabs">
<li class="js-tablist__item">
<a href="#id_other" id="label_id_other" class="js-tablist__link">1st tab</a>
</li>
<li class="js-tablist__item">
<a href="#id_another" id="label_id_another" class="js-tablist__link">2nd tab</a>
</li>
</ul>
<div id="id_other" class="js-tabcontent">
<h2>title</h2>
here the content of 1st tab
</div>
<div id="id_another" class="js-tabcontent">
<h2>other title</h2>
here the content of 2nd tab
</div>
</div>
<br><br><br>
</div>
</body>
</html>