show/hide text, but more...

Discussion in 'Javascript' started by Dan, Apr 28, 2007.

  1. Dan

    Dan Guest

    Hi,

    I know how to show and hide text, but I want to make it so that the
    page shifts up when I hide my text. Right now with the simple code, it
    only leaves a blank space.

    Thanks,
    Daniel


    http://rail.blu-streak.com/galleries/system/1.php

    scroll down to walks to see the show/hide buttons
    Dan, Apr 28, 2007
    #1
    1. Advertising

  2. Dan

    shimmyshack Guest

    On Apr 28, 8:08 am, Dan <> wrote:
    > Hi,
    >
    > I know how to show and hide text, but I want to make it so that the
    > page shifts up when I hide my text. Right now with the simple code, it
    > only leaves a blank space.
    >
    > Thanks,
    > Daniel
    >
    > http://rail.blu-streak.com/galleries/system/1.php
    >
    > scroll down to walks to see the show/hide buttons


    instead of
    e.style.visibility = 'hidden';
    why not define a class in your css
    ..gone
    {
    visibility: hidden;
    display: none;
    }
    and use
    e.className = 'gone';

    or check out one of the libraries for js effects, scriptaculous etc...
    shimmyshack, Apr 28, 2007
    #2
    1. Advertising

  3. scripts.contact, Apr 28, 2007
    #3
  4. Dan

    Guest

    Dan wrote:
    > Hi,
    >
    > I know how to show and hide text, but I want to make it so that the
    > page shifts up when I hide my text. Right now with the simple code, it
    > only leaves a blank space.
    >
    > Thanks,
    > Daniel
    >
    >
    > http://rail.blu-streak.com/galleries/system/1.php
    >
    > scroll down to walks to see the show/hide buttons


    Display:none removes the element from the layout.
    visibility:hidden keeps the element in the layout but does not show
    the content.

    using Display:none to forces a realignment of the page layout creating
    the effect you want.

    HTH Prince
    --
    http://dyumnin.com/webapps/howto/web_application_components_javascript.shtml
    http://dyumnin.com
    , Apr 28, 2007
    #4
  5. Dan

    Dan Guest

    Thank you so much. This helps a lot
    Dan, Apr 30, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michel Couche

    Datalist: "hide/show" more details

    Michel Couche, Feb 1, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    500
    Michel Couche
    Feb 1, 2006
  2. Replies:
    1
    Views:
    581
    Evertjan.
    Sep 30, 2005
  3. Replies:
    5
    Views:
    167
    Ferd Berfle
    Sep 7, 2005
  4. Replies:
    1
    Views:
    174
    Evertjan.
    Sep 30, 2005
  5. ll
    Replies:
    2
    Views:
    641
    Thomas 'PointedEars' Lahn
    May 1, 2008
Loading...

Share This Page