Results 1 to 2 of 2

Thread: DD Drop Down Panel State

  1. #1
    Join Date
    Oct 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD Drop Down Panel State

    1) Script Title: DD Drop Down Panel

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

    3) Describe problem: Is there a way to have this display in the open state? Thanks.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,897
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Sure, try the below modified .js file. It adds a new "dir" option at the very end of the file inside the initialization code you can use to set the initial state of the drop down panel to be visible by default:

    Code:
    var defaultpanel=new ddpanel({
    	ids: ["mypanel", "mypanelcontent", "mypaneltab"], // id of main panel DIV, content DIV, and tab DIV
    	stateconfig: {initial: "5px", persiststate: false}, // initial: initial reveal amount in pixels (ie: 5px)
    	animate: {enabled: true, steps: 5}, //steps: number of animation steps. Int between 1-20. Smaller=faster.
    	pointerimage: {enabled: true, src: ["arrow-down.gif", "arrow-up.gif"]},
    	dir:'down',
    	closepanelonclick: {enabled: true} // close panel when links or elements with CSS class="closepanel" within container is clicked on?
    })
    Remove this option in red to revert the script back to its default contracted state when the page loads.
    DD Admin

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
  •