Show/hide content w/slide effect

Discussion in 'JavaScript' started by the_pm, Nov 18, 2006.

  1. #1
    I've added a new little JavaScript widget to my collection, and I thought I would share it with y'all here :)

    This is a script that allows you to hide/show a portion of your page content at the top of the screen. This sounds easy enough, right? Well, there are three additional features. 1) The content slides smoothly into view and out of view. 2) You can control the speed at which the content slides. 3) No script editing or setting of variables is necessary - the entire script API is external to the script and requires only that you add "-#" at the end of the container ID that holds your hidden information.

    Here's a link to the script and a demo - http://www.iwdn.net/showthread.php?t=5233

    There's a heavily commented script version as well, which goes line-by-line through the script and explains what's taking place. Enjoy, and let me know if you find this useful or if you've improved on it! :)
     
    the_pm, Nov 18, 2006 IP
  2. mani

    mani Peon

    Messages:
    679
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    great job, i will give it a try on my site for comment displaying :)
     
    mani, Nov 21, 2006 IP
  3. the_pm

    the_pm Peon

    Messages:
    332
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Great! Please post when you've finished. I'd love to see it in action :)
     
    the_pm, Nov 21, 2006 IP
  4. drawmedia

    drawmedia Peon

    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It looks great :) Add a cookie too :D so browser remembers either it was opened or closed ^^
     
    drawmedia, Nov 22, 2006 IP
  5. the_pm

    the_pm Peon

    Messages:
    332
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ooh, now there's an idea I didn't think of. Good plan - I'll give it a try over the holiday weekend. Thanks for the recommendation :)
     
    the_pm, Nov 22, 2006 IP