Results 1 to 4 of 4

Thread: Drop Down Panel Closes After TimeoutPeriod

  1. #1
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Drop Down Panel Closes After TimeoutPeriod

    1) Script Title: DD Drop Down Panel

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pdownpanel.htm

    3) Describe problem: I edited the js file so the panel is open upon entering a page. I am not sure how to code the panel to close after X seconds and would like it to only appear open once per browser session. Is this possible? Thank you in advance!! - Grayson
    Last edited by Snookerman; 06-27-2009 at 10:16 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The code:

    Code:
    panelinstance.togglepanel('up')
    can be called to dynamically close a panel (where "panelinstance" is the name of the variable used when initializing it). Having said that, you can do something like the following to close a panel after x seconds:

    Code:
    setTimeout(function(){
    	panelinstance.togglepanel('up')
    }, 5000)
    where 5000 is in milliseconds here.
    DD Admin

  3. #3
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your quick reply!!!

  4. #4
    Join Date
    Dec 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is a great little feature to have, but I can't seem to get it work the way I'm after.

    Is there a method to have the initial state as down, and when the user toggles up (no timeout limit) then it won't appear again until they toggle down. Can I do this with with cookies?

    I've tried changing the function ddpanel(setting){ setting.dir="up" to down, then toggle close, but when I refresh the page, it always shows in the down state.

    Cheers

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
  •