SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist stef25's Avatar
    Join Date
    Nov 2004
    Location
    belgium
    Posts
    465
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hiding a div / scriptaculous

    I'm using scriptaculous to make a div appear with an onclick event. however i want the div to be hidden by default

    if i use css display:none then the scriptaculous effect no longer works. if i use visibility hidden then the div still takes up space but you can not see it. if i hide it with a scriptaculous effect (shrink) with body onload, then i can see it shrink just when the page loads ...

    anyone know what the best way to achieve this is?
    I need someone to protect me from
    all the measures they take in order to protect me

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tell us which is the effect and post some code..
    regards

  3. #3
    SitePoint Member rosst's Avatar
    Join Date
    Aug 2003
    Location
    Watford, UK
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you tried using display:none; did you use it in an attached stylesheet or directly on your div?

    This tag should work if you use it like this on your div:

    Code:
    <div style="display:none;">

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
    .some-element {
     height: 0;
     overflow: hidden;
    }
    (will never be shown if JS is turned off though)


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
  •