pizzaguy Posted December 7, 2008 Share Posted December 7, 2008 I have a link and a simple javascript function thats supposed to make a Div appear, and when clicked again, disappear. It works fine on my local PC, but when i look at it with a domain name it doesnt work. what happens is, instead of the div appearing the link disappears here is the link: <li><a href="java script:void" class="menua" onclick="toggle();">Login/Join</a></li> here is the function: <script>function toggle(){ if(document.getElementById("login").style.visibility=="hidden") { document.getElementById("login").style.visibility="visible"; } else if(document.getElementById("login").style.visibility=="visible") { document.getElementById("login").style.visibility="hidden"; }}</script> and the div: <div id="login" style="visibility: hidden;"></div> and when i look at the code in firebug it seems that the link gets display: none; added to it. <a class="menua" onclick="toggle();" href="java script:void" style="display: none;">Login/Join</a> anyone have an idea what is going on? Link to comment Share on other sites More sharing options...
Synook Posted December 8, 2008 Share Posted December 8, 2008 You don't have another toggle() function, do you? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.