TOGGLE
<script src="https://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(e) {
$(".title").on("click", showHideMe);
function showHideMe(event) {
// VERY IMPORTANT : You must add the "#" or the "." when you declare the variable
// $(this) refers to the object that has been clicked on
// .children(".content") looks for any elements inside my DIV that have a class called ".content"
// .attr('id') grabs the id of the interior division with the class ".content"
var mycontent = "#" + $(this).children(".content").attr('id');
//alert(mycontent);
$(mycontent).toggle("slow");
};
});
</script>
</head>
<body>
<div id="info" class="title"> INFO
<div id="infocontent" class="content">
INFO CONTENT
</div>
</div>
<div id="bio" class="title"> BIO
<div id="biocontent" class="content">
BIO CONTENT
</div>
</div>
<div id="contact" class="title"> CONTACT
<div id="contactcontent" class="content">
CONTACT CONTENT
</div>
</div>