It is similar to the display property.
Style visibility true. Web function stategovoptions(){ if(document.getelementbyid('stategov').value =='yes') document.getelementbyid('stateoptions').setattribute('style','visibility:visible'); //or inline or any of the other combos you might even have made it opacity = 0 $ ('#test1').css ('opacity', '1'); My assumption is, that when hiding it with javascript, the element is truly hidden and taken out of the flow;
Share improve this answer follow 582 function showstuff (id, text, btn) { document.getelementbyid (id).style.display = 'block'; If you used the css visibility value then $ ('#test1').css ('visibility', 'visible');
Web definition and usage the visibility property specifies whether or not an element is visible. Use the display property to both hide and remove an element from the document layout! The visibility property allows the author to show or hide an element.
Web 8 answers sorted by: Take a look at our last example on this page if you want to know how this can be achieved. And when hiding with css style the element is just not shown but still there.
// hide the lorem ipsum text document.getelementbyid (text).style.display = 'none'; 60 depends on how you hid it. If you used css `display' $ ('#test1').css ('display', 'block');
The visibility css property shows or hides an element without changing the layout of a document. Web 15 answers sorted by: Hidden elements take up space on the page.