SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with this jQuery example

    I'm working on the slide down + slide up effect using jQuery. See example B http://docs.jquery.com/Tutorials:Liv...ples_of_jQuery. Getting it to work is easy, this is the code:

    Code:
    $("div.contentToChange p.firstparagraph:hidden").slideDown("slow");
    $("div.contentToChange p.firstparagraph:visible").slideUp("slow");
    I just need to know how to get the box to be hidden by default. Right now when you load the page, the box is visiable. Anyone know how to do this? Thanks!

  2. #2
    code ninja hamstu's Avatar
    Join Date
    Nov 2002
    Location
    Montréal, Canada
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use JavaScript to hide the block when your page loads.
    Code:
    $("div.contentToChange p.firstparagraph").hide();

  3. #3
    SitePoint Member
    Join Date
    May 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Hamstu, worked great.


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
  •