Friday, August 24, 2012

html – hide 'div' tag in javascript

I have a javascript code that hides a tag when it is clicked:



document.getElementById(\"div\").style.visibility=\"hidden\";


although when I do this, even though the div tag is hidden, there is still a space where the div tagis located. how do I collapse the whole div tag using javascript?






Rating: 2 out of 5 based on 5 ratings



The post html – hide 'div' tag in javascript appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/html-hide-div-tag-in-javascript.html

No comments:

Post a Comment