I am working on creating an interactive website for my close circle of friends and family. One of the key features is to have a button that displays their biography when clicked. What I'm aiming for is that when a different bio is selected, the previous one automatically disappears. How can I achieve this effect?
jQuery:
$(document).ready(function(){
$('.page-body2').hide();
$('.page-body3').hide();
$('.family-photo1').on('click', function(){
$('.page-body2').toggle();
});
$('.family-photo2').on('click', function(){
$('.page-body3').toggle();
});
***CODE HERE?***
});
HTML:
<div class="page-body2">
<div class="bren"><b>Brendon:</b></div>
<p>**BIO**</p>
</div><div class="page-body3">
<div class="heath"><b>Heather:</b></div>
<p>**BIO**</p>
</div>