thanks for looking at this. I've searched for a couple hours and can't find a solution that fits my problem. I have 5 navigation links in a fixed header. Clicking on one link works fine; the links show hidden content. The problem is when trying to go to a second link. The content from the first link does not disappear, and the content from the second link appears below the content from the first link. I need the content from the first link to hide when clicking on a new link. Not sure if it matters, but I'm using bootstrap. Here is my code:
function toggler(divId) {
$("#" + divId).toggle();
}
<div class="row">
<div class="col">
<a href="#" onclick="toggler('slide1');">slide 1</a>
</div>
<div class="col">
<a href="#" onclick="toggler('slide2');">slide 2</a>
</div>
<div class="col">
<a href="#" onclick="toggler('slide3');">slide 3</a>
</div>
<div class="col">
<a href="#" onclick="toggler('slide4');">slide 4</a>
</div>
<div class="col">
<a href="#" onclick="toggler('slide5');">slide 5</a>
</div>
</div>
<div class="container">
<div id="slide1" class='hidden'>
<div class="row">
<div class="col">
<img src="img.jpg">
</div>
<div class="col">
<img src="img.jpg">
</div>
</div>
</div
<div id="slide2" class='hidden'>
<div class="row">
<div class="col">
<img src="img.jpg">
</div>
<div class="col">
<img src="img.jpg">
</div>
</div>
</div>
<div id="slide3" class='hidden'>
<div class="row">
<div class="col">
<img src="img.jpg">
</div>
<div class="col">
<img src="img.jpg">
</div>
</div>
</div>
<div id="slide4" class='hidden'>
<div class="row">
<div class="col">
<img src="img.jpg">
</div>
<div class="col">
<img src="img.jpg">
</div>
</div>
</div>
<div id="slide5" class='hidden'>
<div class="row">
<div class="col">
<img src="img.jpg">
</div>
<div class="col">
<img src="img.jpg">
</div>
</div>
</div>
</div>