<p>Theorem</p>
<p>Theorem</p>
<div>
<a href="#" class="hide" data-toggle="#pcontent">Proof</a>
<div id="pcontent">
Details go here.
</div>
</div>
<script class="cssdeck" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
#pcontent {
#pcontent {
display: none;
}
#pcontent.open {
display: block;
}
$('[data-toggle]').on('click', function() {
$('[data-toggle]').on('click', function(){
var id = $(this).data("toggle"),
$object = $(id),
className = "open";
if ($object) {
if ($object.hasClass(className)) {
$object.removeClass(className)
$(this).text("Proof");
} else {
$object.addClass(className)
$(this).text("Proof");
}
}
});