Striped Fish2 Posted August 16, 2011 Share Posted August 16, 2011 function HideMenu {document.getElementById("Menu").style="visibility:hidden";} When run it doesn't hide the element and the divider I am using had the id of Menu. I don't understand what's wrong. TIA. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 16, 2011 Share Posted August 16, 2011 document.getElementById("Menu").style.visibility = "hidden"; Link to comment Share on other sites More sharing options...
dsonesuk Posted August 16, 2011 Share Posted August 16, 2011 javascriptdocument.getElementById("Menu").style.visibility="hidden";cssstyle="visibility:hidden"; Link to comment Share on other sites More sharing options...
jeffman Posted August 17, 2011 Share Posted August 17, 2011 FWIW, explore the different behavior caused bydisplay: none; Link to comment Share on other sites More sharing options...
tinfanide Posted August 17, 2011 Share Posted August 17, 2011 function HideMenu {document.getElementById("Menu").style="visibility:hidden";} When run it doesn't hide the element and the divider I am using had the id of Menu. I don't understand what's wrong. TIA. Whenever ya don't understand what's going wrong, ya can of course go here and post ya question.But I'd also like to use some consoles to debug for yaself first to save time:Dreamweaver (can check invalid codes for ya automatically)Firefox console (Tools-Websole [ctrl+shift+k]) or go to Deirdre's Dad's profile page for more info of web consoleIE developer tool (IE-[F12])Or go to W3schools Tutorial to checkHTML DOMFWIW, explore the different behavior caused bydisplay: none;Glorfindel, for ya next step, ya may wanna explore that. That difference can be a good trick for using JS and HTML.HTML DOM: visibility Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.