$(document).ready(function() {
$('.team-container').find('img').click(function() { var $imgHost = $(this).parent(); var $container = $imgHost.parent();
// Show details interface $imgHost.toggleClass('active'); $container.toggleClass('displaying');
// Copy information content for the selected team member var memberName = $imgHost.attr('data-member'); var $memberInfo = $('#member-info').find('#member-' + memberName); var $memberContainer = $container.find('.member-info');
$memberContainer.html($memberInfo.html()); });
$('.info-close').click(function() { var $container = $(this).parent().parent();
// Close details interface $container.removeClass('displaying'); $container.find('.active').removeClass('active'); });
$('.menu-button').click(function() { $('.closed-menu').toggle(); window.scrollTo(0, 0); });
});