<script>
var toggleVisibility = function(element) {
if(element.style.display=='block'){element.style.display='none';}
else {element.style.display='block';}
};
</script>
I got this code from another site and in my div, which should change from display:none to display:block when something is clicked, doesnt work with severel div id's from css :/
I got this in my div which should be clicked to make others divs visible:
<div id="profile_button_box" onclick="toggleVisibility(document.getElementById('testt'))">
I read that this only can have one ID but how should I modify the code to be able to handle severel divs with one click?