Results 1 to 6 of 6

Thread: hiding webpage?

  1. #1
    Join Date
    Dec 2007
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hiding webpage?

    Hi all,

    I came across a site a few days ago that had an interesting piece of functionality. When you click on the "eye" icon on the top right of the screen, the webpage disappears and only the fullscreen background image is shown. I'm wondering if anyone has any resources on how to do this. I'm working on a project right now where this would be very useful.

    http://itp.nyu.edu/sigs/

    ~ Regards
    Steve

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    well, you could use some sort of "onclick" event with javascript which would activate a stylesheet that had everything set to "visibility:hidden;"

    you would need to locate all of your "container" elements and make sure they all have either ID's or Classes in css... then in a separate stylesheet set them all to "visibility:hidden;"
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. #3
    Join Date
    Dec 2007
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sounds like a good idea. I need to brush on my javascript a bit.

    Thanks Nyne

  4. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    glad to help
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  5. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by Nyne Lyvez View Post
    you would need to locate all of your "container" elements and make sure they all have either ID's or Classes in css... then in a separate stylesheet set them all to "visibility:hidden;"
    Ideally, it would only be one element and you can don't need to go about changing the stylesheet. That would work, but it's a harder solution in my view. If you're hiding disjointed portions, then a stylesheet switch would be smarter.

    I use jquery for this kind of thing. But, I've also used this small snippet in the past:

    Code:
    <script type="text/javascript">
    <!--
        function toggle_visibility(id) {
           var e = document.getElementById(id);
           if(e.style.display == 'block')
              e.style.display = 'none';
           else
              e.style.display = 'block';
        }
    //-->
    </script>

    On a unrelated note...that website brings back a lot of memories. I did my undergraduate studies at NYU. Quite the days...

  6. #6
    Join Date
    Dec 2007
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks medyman and nyne for your help! I managed to find something that worked well. I have yet to decide on what the button will look like, but the dark grey square works for now until I actually have the design actually finished, approved and ready for build out.

    http://spectrum-ltd.com/comps/index_2.html

    I love this forum, yet I am still a junior coder....

    ~ Regards
    Steve

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •