Results 1 to 3 of 3

Thread: Accordion Content script - Set Default Expand Inline?

  1. #1
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion Content script - Set Default Expand Inline?

    1) Script Title: Accordion Content script

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

    3) Describe problem: Hey guys, I have a simple question for anyone that is familiar with how this awesome script works..

    I am using this menu as a sub-menu for pages within a technical document. I'd like to set the defualt expanded List Item for each page individually based on an inline calls since the template I am using doesn't allow me to edit the universal "defaultexpanded" configuration script in the html header.

    Anyone know how I can get this done?
    Last edited by mmc215; 08-07-2008 at 09:48 PM. Reason: clarified description.

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

    Default

    You can try calling ddaccordion.expandone() to specifically expand a header. In your case, since you want to do this automatically when the page loads, you should wrap it inside jQuery's DOM onload function:

    Code:
    <script type="text/javascript">
    
    jQuery(document).ready(function($){
    	ddaccordion.expandone('expandable', 2) //expand 3rd header of Header Class "expandable"
    })
    
    </script>
    DD Admin

  3. #3
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks! this works!

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
  •