Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
58
rated 0 times [  62] [ 4]  / answers: 1 / hits: 15158  / 9 Years ago, mon, october 26, 2015, 12:00:00

Thanks to anyone who solves/helps solving this request. Sorry if this is an impossible/previously asked request. I searched for it, couldn't find it, so posted a question.



So, the issue is, I want to hide using JS, but, I don't wanna use DIV tags to do so.



<body>
<div id=1>Content 1</div>
<div id=2>Content 2</div>
<div id=3>Content 3</div>
</body>


I know the possibilty of grouping the DIV's into a single DIV container, but just wanted to know, if it's possible without that, i.e., hiding the whole <body></body>



Thanks again.


More From » jquery

 Answers
40

It is possible with javascript like this:



document.getElementsByTagName(BODY)[0].style.display = none;


jsFiddle here: http://jsfiddle.net/aq2ab77v/1/


[#64596] Friday, October 23, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tyquandaquanl

Total Points: 122
Total Questions: 109
Total Answers: 101

Location: South Georgia
Member since Sun, Aug 8, 2021
3 Years ago
;