dennylin93 0 Posted February 14, 2007 Report Share Posted February 14, 2007 I was trying to make a hide/show function with JS, but I got stuck. I was trying to make it like the ones on Wikipedia: http://en.wikipedia.org/wiki/TaipeiEx. Can anyone help me with this? Thanks in advance. Quote Link to post Share on other sites
dennylin93 0 Posted February 14, 2007 Author Report Share Posted February 14, 2007 Never mind. I found out after I fiddled with it for a few hours. Quote Link to post Share on other sites
Anders Moen 2 Posted February 14, 2007 Report Share Posted February 14, 2007 Post script maybe? Quote Link to post Share on other sites
Skemcin 13 Posted February 14, 2007 Report Share Posted February 14, 2007 I've posted several snippets here already:http://w3schools.invisionzone.com/index.php?showtopic=9500 Quote Link to post Share on other sites
Lepper 0 Posted February 22, 2007 Report Share Posted February 22, 2007 To show or hide some thing in your page use the property .style.display in the element you want to show/hide... for example: <script type="text/javascript">function showHide(id){var element = document.getElementById(id); try{ if(element.style.display == "none") {element.style.display = "";}} catch (e) { //do something if the id provided doesn-t obtain an element from your document}} PD: you can replace line <element.style.display = "";> with element.style.display = "block"; too Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.