troubleshooting Question

Show/hide a div tag based on content in the DIV tag

Avatar of niceoneishere
niceoneishere asked on
JavaScriptCSSHTML
11 Comments4 Solutions421 ViewsLast Modified:
Hello Experts,
I have a div tag in my global footer which appears on all pages of my site. Now this div tag cotains some content to show additional information. here is my write up so far

<div id="footer">
  <div id="info">
     some content here
  </div>
</div>

now there are some pages where i dont need any to show any addtional content

so whats happening that div is just appearing in all pages and taking up the space on my footer.

What I want to do is hide the info div tag if its empty and show if its not empty

is it possible to do this like on a page load

thanks and appreicate it
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 4 Answers and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros