<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ---------->
<div class="container">
<div class="row">
<ul class="my-toggle">
<li>
<a class="view">
<div class="row">
<div class="col-sm-12">
<h3 class="toggle-title">Toggle 1 (click to view)</h3>
</div>
</div>
</a>
<div class="detail">
<div class="row">
<div class="col-sm-12">
<div class="toggle-wrapper">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
</div>
</div>
</li>
<li>
<a class="view">
<div class="row">
<div class="col-sm-12">
<h3 class="toggle-title">Toggle 2 (click to view)</h3>
</div>
</div>
</a>
<div class="detail">
<div class="row">
<div class="col-sm-12">
<div class="toggle-wrapper">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
</div>
</div>
</li>
<li>
<a class="view">
<div class="row">
<div class="col-sm-12">
<h3 class="toggle-title">Toggle 3 (click to view)</h3>
</div>
</div>
</a>
<div class="detail">
<div class="row">
<div class="col-sm-12">
<div class="toggle-wrapper">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
.my-toggle {
margin: 20px 0;
}
.my-toggle > li {
display: block;
list-style: outside none none;
margin-bottom: 15px;
}
.toggle-title {
font-weight: 400;
font-size: 18px;
color: #304351;
margin-bottom: 0;
line-height: 52px;
margin-top: 0;
}
.view {
background-color: #f4f8f8;
color: #304351;
cursor: pointer;
display: block;
padding: 0 20px;
text-decoration: none;
height: 52px;
border-radius: 2px;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition:all 0.2s;
line-height: 52px;
position: relative;
}
.view.opened {
background: #03adf8;
border-radius: 3px 3px 0 0;
border-bottom: 1px solid rgba(255,255,255,0.12);
}
.detail {
padding: 15px 20px;
display: none;
line-height: 20px;
font-size: 16px;
background-color: #03adf8;
color: #fff;
border-radius: 0 0 3px 3px;
border-top: 1px solid rgba(255,255,255,0.15);
font-weight: 300;
}
.view:hover {
text-decoration: none;
background: #03adf8;
}
.view.opened {
background-color: #03adf8;
border: 0 none;
}
.view.opened .toggle-title,
.view:hover .toggle-title {
color: #fff;
}
$(function() {
$(".view").on( "click", function() {
$(this).next().slideToggle(250);
$fexpand = $(this).find(">:first-child");
if ($(this).hasClass('opened')) {
$(this).removeClass('opened');
} else {
$(this).addClass('opened');
};
});
});