Results 1 to 5 of 5

Thread: Running 2 accordion scripts on same page?

  1. #1
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Running 2 accordion scripts on same page?

    1) Script Title:
    Accordion Content script

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

    3) Describe problem:

    Hey everyone.

    I wish to have both these scripts running on a single html page (php when I get around to fixing it that way), but can't quite figure out how to do it. I have a version of the apple style menu that I've styled to fit my site as a main menu, and I want to use the glossy style menu as a drop down for information in the main content area.
    I have each script working fine separately, but when they are both on the same html page the content accordion 'headers' control the top menu.
    I tried to duplicate the ddaccordion.js file and change the name to ddaccordion2.js, then had the content accordion call ddac...2.js instead, and also changed the submenu to submenu2. This didn't help. I saw somewhere else in the forum that someone was trying to use this script with a lightbox and they had to just change $ to j$ in the .js file, so I tried that and it killed it completely instead.

    Any ideas on whether it's possible?
    Thanks in advance, and this is a fantastic site. I've found it highly educational in my learning on programming and coding.

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

    Default

    The script supports multiple accordion menus on the same page, so you shouldn't need to duplicate ddaccordion.js multiple times. The key is just to make sure the CSS classes for the two menus are different. Please post a link to the problem page so we can check it out.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    CookieSlayer666 (01-02-2010)

  4. #3
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    http://newgoldtown.com/objecttest2.html

    I know it's not complete and the tags for the 2nd accordion are calling wrong but it's just to give an example of where it will be sat. The link below is the actual content that will be there.

    http://newgoldtown.com/accordionexample.html

    If it's just a case of changing the css classes that'd be fantastic. If you have examples I'd be very appreciative.

  5. #4
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Actually, I managed to get it to work. When you mentioned the css classes, I experimented around with it a bit and got it working.

    http://newgoldtown.com/objecttest3.html

    Thanks for pointing me in the right direction! Very much appreciated.

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

    Default

    Glad to hear!
    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
  •