Jump to content

Help


abdua5s

Recommended Posts

See...

 

http://www.w3schools.com/css/tryit.asp?filename=trycss_display_none

 

...which can easily be modified like this...

<!DOCTYPE html><html><head><meta charset="utf-8"><title>tab</title><style>.hidden { display: none;}.display {  display: block;  cursor:pointer;  background-color:yellow;}</style><script>window.onload = init;function init(){setTimeout(showit,5000);}function showit(){var it = document.getElementsByClassName('hidden')[0];it.className = 'display';it.onclick = hideit;}function hideit(){var it = document.getElementsByClassName('display')[0];it.className = 'hidden';}</script></head><body><h1>This is a visible heading</h1><h1 class="hidden">This is a hidden heading (Click Here)</h1><p>Notice that the h1 element with display: none; does not take up any space.</p></body></html>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...