View Single Post
Old 09-28-2012, 01:52 AM   PM User | #6
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
Quote:
Originally Posted by Old Pedant View Post
Read Philip's code: You want a TOGGLE.

Here. The specific code for your actual situation:
Code:
<div onclick="toggle()"><strong>Buy</strong></div>
<div id="buyrevealed" style="display: none;">
    ... your form ...
</div>
...
function toggle( )
{
    var div = document.getElementById("buyrevealed");
    div.style.display = ( div.style.display == "block" ) ? "none" : "block";
}
...
}
Is there a way I can have multiple toggle's?
rexhvn is offline   Reply With Quote