Following some examples Ive seen, I am trying to be able to click to show/hide a Div ID. Content is hidden but when I click AFC Playoff Race, nothing happens. Any ideas what I am doing wrong?
CSS Style sheet includes:
.hidden { visibility: hidden; }
.unhidden { visibility: visible; }
Here is the javascript:
<script type="text/javascript">
function unhide(divID) {
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidden':'hidden';
}
}
</script>
Here is the HTML Code:
<div class="panel panel-afc nopad playoffs">
<div class="panel-heading">
<a href="javascript:unhide('afc-playoff-container');" rel="nofollow">AFC Playoffs</a>
</div>
<div class="panel-body">
<div id="afc-playoff-container" class="hidden">
<div id="afc playoff">
<table class="data-table1" border="0" width="100%"></table>
</div>
</div>
</div>
</div>
<tableis missing the>. Is that a typo?hidden/unhiddencss classes defined in your css style sheets?