xxxxxxxxxx
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<title>Accordion</title>
5
</head>
6
<body>
7
<div class="accordion" id="accordionExample275" aria-multiselectable="true">
8
<div class="card z-depth-0">
9
<div class="card-header" role="tab" id="headingOne">
10
<h5 class="mb-1">
11
12
<button class="btn btn-link" type="button" data-toggle="collapse" data-target=".multi-collapse"
13
aria-expanded="false" aria-controls="collapseOne2 collapseOne3" style="font-size:20px" >
14
<p id="text">Still Have More Questions? We Have More Answers.</p>
15
<div class="center">
16
<button class="button1 button1" type="button" data-toggle="collapse" id="collapseOne1" data-target=".multi-collapse"
17
aria-expanded="false" aria-controls="collapseOne2 collapseOne3">View FAQ</button>
18
</div>
19
</button>
20
</h5>
21
</div>
22
<h5>
23
<div class="collapse multi-collapse" >
24
<button class="btn1 btn-link" role="tab" type="button" data-toggle="collapse" id="collapseOne2" data-target="#collapseOne3"
25
aria-expanded="true" aria-controls="collapseOne3" style="font-size:20px">
26
Question #1
27
</button>
28
</div>
29
</h5>
30
<div class="collapse multi-collapse">
31
<div id="collapseOne3" class="collapse" aria-labelledby="headingOne"
32
data-parent="#accordionExample275" data-toggle="collapse" role="tabpanel">
33
<div class="card-body" style="font-size:20px">
34
Answer #1 ..............................
35
</div>
36
</div>
37
</div>
38
<h5>
39
<div class="collapse multi-collapse" >
40
<button class="btn1 btn-link" role="tab" type="button" data-toggle="collapse" id="collapseOne4" data-target="#collapseOne5"
41
aria-expanded="true" aria-controls="collapseOne5" style="font-size:20px">
42
Question #2
43
</button>
44
</div>
45
</h5>
46
<div class="collapse multi-collapse">
47
<div id="collapseOne5" class="collapse" aria-labelledby="headingOne"
48
data-parent="#accordionExample275" data-toggle="collapse" role="tabpanel">
49
<div class="card-body" style="font-size:20px">
50
Answer #2 ...............................
51
</div>
52
</div>
53
<h5>
54
<div class="collapse multi-collapse" >
55
<button class="btn1 btn-link" role="tab" type="button" data-toggle="collapse" id="collapseOne6" data-target="#collapseOne7"
56
aria-expanded="true" aria-controls="collapseOne7" style="font-size:20px">
57
Question #3
58
</button>
59
</div>
60
</h5>
61
<div class="collapse multi-collapse">
62
<div id="collapseOne7" class="collapse" aria-labelledby="headingOne"
63
data-parent="#accordionExample275" data-toggle="collapse" role="tabpanel">
64
<div class="card-body" style="font-size:20px">
65
Answer #3 ........................
66
</div>
67
</div>
68
</div>
69
</div>
70
</div>
71
</div>
72
</body>
73
</html>
xxxxxxxxxx
1
.collapsing {
2
position: relative;
3
height: 0;
4
overflow: hidden;
5
-webkit-transition-property: height, visibility;
6
transition-property: height, visibility;
7
-webkit-transition-duration: .17s;
8
transition-duration: .17s;
9
-webkit-transition-timing-function: ease-in-out;
10
transition-timing-function: ease-in-out;
11
}
12
13
.button1 {
14
background-color: #ffffff; /* White */
15
border: none;
16
color: black;
17
text-align: center;
18
text-decoration: none;
19
display: inline-block;
20
font-size: 16px;
21
margin: 4px 2px;
22
padding: 12px 100px;
23
cursor: pointer;
24
margin: 0;
25
position: absolute;
26
top: 70%;
27
left: 50%;
28
-ms-transform: translate(-50%, -50%);
29
transform: translate(-50%, -50%);
30
}
31
32
.center {
33
margin: 0;
34
position: static;
35
top: 65%;
36
left: 50%;
37
-ms-transform: translate(-50%, -50%);
38
transform: translate(-50%, -50%);
39
}
40
41
.text {
42
align-content: center;
43
padding: 10 10 10 10;
44
45
}
46
.card-header {
47
background-color:#ffffff;
48
}
49
.btn {
50
width:100%;
51
height:150px;
52
text-align: center;
53
background-color: #3f516c;
54
color: #ffffff;
55
border-width: 0px;
56
border: none;
57
border-style: none;
58
align-content: center;
59
}
60
61
.btn:visited {
62
width:100%;
63
height:150px;
64
text-align: center;
65
background-color: #3f516c;
66
color: #ffffff;
67
border-width: 0px;
68
border: none;
69
border-style: none;
70
align-content: center;
71
}
72
73
.btn:focus {
74
width:100%;
75
height:150px;
76
text-align: center;
77
background-color: #3f516c;
78
color: #ffffff;
79
border-width: 0px;
80
border: none;
81
border-style: none;
82
align-content: center;
83
}
84
85
.btn:hover {
86
width:100%;
87
height:150px;
88
text-align: center;
89
background-color: #3f516c;
90
color: #ffffff;
91
border-width: 0px;
92
border: none;
93
border-style: none;
94
align-content: center;
95
}
96
97
.btn:active {
98
width:100%;
99
height:150px;
100
text-align: center;
101
background-color: #3f516c;
102
color: #ffffff;
103
border-width: 0px;
104
border: none;
105
border-style: none;
106
align-content: center;
107
}
108
109
p:hover {
110
111
opacity:1.0;
112
box-shadow:none;
113
114
}
115
116
.btn1 {
117
width:100%;
118
height:80px;
119
padding-top: 10px;
120
padding-bottom: 100px
121
padding-left: 20px
122
padding-bottom: 15px;
123
text-align: left;
124
border-width: 0px;
125
border-bottom: 1px solid black;
126
text-decoration: none;
127
}
128
129
130
.btn1, .btn1:hover, .btn1:active, .btn1:visited, .btn1:focus {
131
text-decoration:none;
132
}
133
134
#collapseOne3 {position: relative; left: 10px; border-bottom: 1px solid black; text-align: left;}
135
#collapseOne5 {position: relative; left: 10px; border-bottom: 1px solid black; text-align: left;}
136
#collapseOne7 {position: relative; left: 10px; border-bottom: 1px solid black; text-align: left;}
137
138
#collapseOne2 {
139
position: relative;
140
left: 10px;
141
}
142
#collapseOne4 {
143
position: relative;
144
left: 10px;
145
}
146
147
#collapseOne6 {
148
position: relative;
149
left: 10px;
150
}
151
152
.headingOne {
153
height: auto;
154
overflow: hidden;
155
}
156
157
158
xxxxxxxxxx
1
<script type='text/javascript' src="js/jquery.min.js"></script>
2
<script type='text/javascript'>
3
// Size the parent iFrame
4
function iframeResize() {
5
var height = $('body').outerHeight(); // IMPORTANT: If body's height is set to 100% with CSS this will not work.
6
parent.postMessage("resize::"+height,"*");
7
}
8
9
$(document).ready(function() {
10
// Resize iframe
11
setInterval(iframeResize, 17);
12
13
14
});
15
</script>
16
17
$('#first-button, #collapseOne1').on('click', () => {
18
const $els = $('.multi-collapse > div');
19
$els.each(function() {
20
if ($(this).hasClass('show')) $(this).removeClass('show');
21
});
22
});
23
Console errors: 0