View Single Post
Old 01-16-2013, 12:00 AM   PM User | #15
rexhvn
New Coder

 
Join Date: Oct 2011
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
rexhvn is an unknown quantity at this point
Hi guys,

I wanted to bring this thread back for some more assistance with the toggle function.

Currently I have 4 seperate toggle functions - lets call them 1,2,3,4

The code of each toggle is as follows
Code:
function toggle(1/2/3/4)
{
    var div = document.getElementById("buyrevealed");
    div.style.display = ( div.style.display == "block" ) ? "none" : "block";
}
Currently if I click toggle 1, all is good, however if I click toggle 2 while toggle 1 is displayed , Toggle 2 will not appear due to the way it is coded.

I was hoping to get assistance to hide any other toggle unless it is clicked on so there won't be an issue when clicking on any of them

Hope this makes sense.

Thanks guys
rexhvn is offline   Reply With Quote