<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!DOCTYPE html><html class=''>
<head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/Benny29390/pen/zwyGxm?limit=all&page=15&q=Accordion" />
<style class="cp-pen-styles">@import url("https://fonts.googleapis.com/css?family=Oswald");
body {
position: relative;
font-family: 'Oswald', sans-serif;
background: #303F9F;
color: #fff;
font-size: 20px;
}
.grid {
list-style: none;
margin-left: -40px;
}
.gc {
box-sizing: border-box;
display: inline-block;
margin-right: -.25em;
min-height: 1px;
padding-left: 40px;
vertical-align: top;
}
.gc--1-of-3 {
width: 33.33333%;
}
.gc--2-of-3 {
width: 66.66666%;
}
.naccs {
position: relative;
max-width: 900px;
margin: 100px auto 0;
}
.naccs .menu div {
padding: 15px 20px 15px 40px;
margin-bottom: 10px;
color: #303F9F;
background: #3F51B5;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
cursor: pointer;
position: relative;
vertical-align: middle;
font-weight: 700;
-webkit-transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1);
transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1);
}
.naccs .menu div:hover {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.naccs .menu div span.light {
height: 10px;
width: 10px;
position: absolute;
top: 24px;
left: 15px;
background-color: #303F9F;
border-radius: 100%;
-webkit-transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1);
transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1);
}
.naccs .menu div.active span.light {
background-color: #FBC02D;
left: 0;
height: 100%;
width: 3px;
top: 0;
border-radius: 0;
}
.naccs .menu div.active {
color: #FBC02D;
padding: 15px 20px 15px 20px;
}
ul.nacc {
position: relative;
height: 0px;
list-style: none;
margin: 0;
padding: 0;
-webkit-transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
}
ul.nacc li {
opacity: 0;
-webkit-transform: translateX(50px);
transform: translateX(50px);
position: absolute;
list-style: none;
-webkit-transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1);
transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1);
}
ul.nacc li.active {
-webkit-transition-delay: .3s;
transition-delay: .3s;
z-index: 2;
opacity: 1;
-webkit-transform: translateX(0px);
transform: translateX(0px);
}
ul.nacc li p {
margin: 0;
}
</style></head><body>
<body>
<div class="naccs">
<div class="grid">
<div class="gc gc--1-of-3">
<div class="menu">
<div class="active"><span class="light"></span><span>Beer</span></div>
<div><span class="light"></span><span>Vine</span></div>
<div><span class="light"></span><span>Lemonade</span></div>
</div>
</div>
<div class="gc gc--2-of-3">
<ul class="nacc">
<li class="active">
<div>
<p>Beer is the world's oldest[1][2][3] and most widely consumed[4] alcoholic drink; it is the third most popular drink overall, after water and tea.[5] The production of beer is called brewing, which involves the fermentation of sugars, mainly derived
from cereal grain starches—most commonly from malted barley, although wheat, maize (corn), and rice are widely used.[6] Most beer is flavoured with hops, which add bitterness and act as a natural preservative, though other flavourings such as
herbs or fruit may occasionally be included. The fermentation process causes a natural carbonation effect, although this is often removed during processing, and replaced with forced carbonation.[7] Some of humanity's earliest known writings refer
to the production and distribution of beer: the Code of Hammurabi included laws regulating beer and beer parlours,[8] and "The Hymn to Ninkasi", a prayer to the Mesopotamian goddess of beer, served as both a prayer and as a method of remembering
the recipe for beer in a culture with few literate people.[9][10]</p>
</div>
</li>
<li>
<div>
<p>A vine (Latin vīnea "grapevine", "vineyard", from vīnum "wine") in the narrowest sense is the grapevine (Vitis), but more generally it can refer to any plant with a growth habit of trailing or scandent (that is, climbing) stems, lianas or runners.
The word also can refer to such stems or runners themselves, for instance when used in wicker work.[1][2] In the United Kingdom, the term "vine" applies almost exclusively to the grapevine. The term "climber" is used for all climbing plants.[3]</p>
</div>
</li>
<li>
<div>
<p>Lemonade is any of various sweetened beverages found around the world, all characterized by lemon flavor. Most lemonade varieties can be separated into two distinct types: cloudy and clear; each is known simply as "lemonade" (or a cognate) in countries
where dominant.[1] Cloudy lemonade, generally found in North America and India, is a traditionally homemade drink made with lemon juice, water, and sweetener such as cane sugar or honey.[2] Found in the United Kingdom, Ireland, South Africa, Australia,
and New Zealand, clear lemonade is a lemon flavoured carbonated soft drink. Not to be confused with Sprite a lemon-lime flavored, soft drink.</p>
</div>
</li>
</ul>
</div>
</div>
</div>
</body>
<script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script >// Acc
$(document).on("click", ".naccs .menu div", function() {
var numberIndex = $(this).index();
if (!$(this).is("active")) {
$(".naccs .menu div").removeClass("active");
$(".naccs ul li").removeClass("active");
$(this).addClass("active");
$(".naccs ul").find("li:eq(" + numberIndex + ")").addClass("active");
var listItemHeight = $(".naccs ul")
.find("li:eq(" + numberIndex + ")")
.innerHeight();
$(".naccs ul").height(listItemHeight + "px");
}
});
//# sourceURL=pen.js
</script>
</body></html>