|
I'm building a site where the links open up div boxes so the user doesn't actually have leave the page when clicking the link. I figured out how to open a div when clicking a link but need to figure out how to close any open div's when clicking a new link (so there aren't a bunch of div boxes open). I tried searching but haven't found much info. Any help would be greatly appreciated. Here is the code below.
<a href="#" onclick="document.getElementById('moreinfo').style .display = 'block';">Link Goes Here</a>
<div><script type="text/javascript"><!--
document.write("<div style='display:none' id='sampleid>");
//-->
</script>Content Going Here<script type="text/javascript"><!--
document.write("</div>");
//--></script></div>
|