<script type="text/javascript">function popup(var1,var2){ var div = document.getElementById(var1); var ele = document.getElementById(var2); if(div.style.display === "none"){div.style.display = "block";} else {div.style.display = "none"; if(ele.style.display === "none"){ele.style.display = "block";} else {ele.style.display = "none";}</script> <a href="#" onclick="popup(one,two)">pop</a> <div id="one" style="visibility: visable; display: none; height:100; width:100;">text<div id="two" style="visibility: visable; display: none; height:100; width:100;">text2</div></div>
This is the code I'm using to test now, but i cant get it to do anything. The link should un-hide and hide the text.