Sweet, i've got it working now using that page you linked to, but I want a way to condense it a bit, at the moment I have this:
Code:
<script>
function toggle_visibility(id) {
var content = document.getElementById(id);
if(content.style.display == 'block'){
content.style.display = 'none';
}
else
content.style.display = 'block';
}
function HideThis(id)
{
var content = document.getElementById(id)
content.style.display='none';
}
</script>
And this in the body:
Code:
<a href="#" onclick="HideThis('ivyinfo'); HideThis('ivygallery'); HideThis('ivycalendar'); toggle_visibility('ivyinfo'); return false;"
<div id="ivyinfo" style="display:none; padding-left:10px;">Info Here</div>
So what I want to be able to do is change the HideThis() function, so I can hide all of them in one statement, instead of separating them, I was thinking maybe HideThis('ivyinfo','ivygallery','ivycalendar') but it didn't work =/ Do you know how to achieve this?
I also want the colour of the tab I've selected to change colour so you know you're on it.
Jack
Edit: Changed code
Bookmarks