Results 1 to 5 of 5

Thread: Accordion Menu not collapsing

  1. #1
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Accordion Menu not collapsing

    1) Script Title: Accordion Menu Script

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

    3) Describe problem: I posted before but the answer was of no help. I copy and pasted the script exactly as shown and it does not work. The menu in the example collapses whereas mine does not. Please compare the example on DD with what I get: http://www.parent-child.org/Wordpres...t-11/test.html

    I feel as though I must be missing some bit of code that tells it to collapse and expand. Can you please tell me what that code is and where I put it?
    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    For one thing, the external script files are not on the server in the location where the page expects them to be:

    Code:
    <script type="text/javascript" src="jquery-1.2.2.pack.js"></script>
    
    <script type="text/javascript" src="ddaccordion.js">
    
    /***********************************************
    * Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    
    </script>
    which, in its current location, is looking for them here:

    Code:
    http://www.parent-child.org/Wordpress/wp-content/themes/cutline-3-column-split-11/jquery-1.2.2.pack.js
    and here:

    Code:
    http://www.parent-child.org/Wordpress/wp-content/themes/cutline-3-column-split-11/ddaccordion.js
    respectively. There could also be other problems.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, I fixed that and it works on the html page I was testing it in. Thank you!

    However, when I move it to use it as a sidebar for wordpress it goes back to the same problem:
    http://www.parent-child.org/Wordpress/

    How can I fix that?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It's the same problem. You could do with a little brush up on the basics of files and folders. If you are going to call upon these scripts from various locations throughout the site, why not just put them in a folder off the root:

    Code:
    http://www.parent-child.org/scripts/
    Then, wherever you want to use them, use these as the calls on the page:

    Code:
    <script type="text/javascript" src="/scripts/jquery-1.2.2.pack.js"></script>
    
    <script type="text/javascript" src="/scripts/ddaccordion.js">
    
    /***********************************************
    * Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    
    </script>
    Also, take a look at the source code of your page (in the browser, chose View > View Source). It has two opening head tags, and possibly other errors. These should be fixed because they might cause problems, if not now, later as your pages become more complex.
    Last edited by jscheuer1; 03-04-2008 at 06:28 PM. Reason: spelling
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you! I can't believe I'm making such simple mistakes. Jumping back in to web design after several years. Thanks again!

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
  •