Show/Hide div in loop
-
I have been trying to create a show/hide div in the wp loop without any success. This simple script work great for one, but in the loop it toggles everything or nothing. Looking at this I need to be able to append something to each one that gets created so that it only works for that one only. Such as this on there bios. Not even sure if this is the right script to work with. Any help out there?
<script type=”text/javascript”>
<!–
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == ‘block’)
e.style.display = ‘none’;
else
e.style.display = ‘block’;
}
//–>
</script>
- The topic ‘Show/Hide div in loop’ is closed to new replies.