<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<section id="employees" class="text-center">
<ul id="employee_list" class="list-unstyled list-inline">
<li class="employee_info">
<a data-toggle="collapse" data-parent="#employee_list" data-target="#collapse1"><img src="http://placehold.it/175x175" width="175" height="175" class="img-circle employee_mugshot" alt="Charles B. Hicks"></a>
<h2>Charles B. Hicks<br><small>Owner</small></h2>
</li>
<li class="employee_info">
<a data-toggle="collapse" data-parent="#employee_list" data-target="#collapse4"><img src="http://placehold.it/175x175" width="175" height="175" class="img-circle employee_mugshot" alt="Kathleen Kirk"></a>
<h2>Kathleen Kirk<br><small>Design Consultant</small></h2>
</li>
<li class="employee_info">
<a data-toggle="collapse" data-parent="#employee_list" data-target="#collapse2"><img src="http://placehold.it/175x175" width="175" height="175" class="img-circle employee_mugshot" alt="Carlos Martinez"></a>
<h2>Carlos Martinez<br><small>Project Manager</small></h2>
</li>
<li class="employee_info">
<a data-toggle="collapse" data-parent="#employee_list" data-target="#collapse3"><img src="http://placehold.it/175x175" width="175" height="175" class="img-circle employee_mugshot" alt="Phil McKenzie"></a>
<h2>Phil McKenzie<br><small>Project Manager</small></h2>
</li>
</ul>
<div id="collapse1" class="collapse employee-collapse employee_bio">
<h3>Charles B. Hicks / <span>Owner</span></h3>
<p>"Chuck" holds a Mechanical Engineering degree from the University of South Carolina and an MBA from Ohio State University. He is a Certified Green Professional, Certified Aging-in-Place Specialist and EPA Certified Lead Renovator.
His ability to estimate, schedule, and meet client objectives stems...
CSS
#employee_list li a img {
border: none;
opacity: .5;
filter: alpha(opacity = 25);
-webkit-transition: opacity .2s ease-in-out;
-moz-transition: opacity .2s ease-in-out;
-o-transition: opacity .2s ease-in-out;
transition: opacity .2s ease-in-out;
}
#employee_list li a:hover img, #employee_list li a img.active {
opacity: 1;
filter: alpha(opacity = 50); /* for IE */
}
JavaScript
// Allow employee bio hide/show to only show one bio at a time
$(".employee-collapse").on("show.bs.collapse", function(e) {
$(".employee-collapse").not(e.target).each(function(i, el){
if ($(el).is(":visible"))
$(el).collapse('hide');
});
});
// Add class of "active" when you click on an employee mugshot, remove it when you click another mugshot
$('.employee_mugshot').click(function() {
$(".employee_mugshot").removeClass("active");
$(this).addClass('active');
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.