PDA

View Full Version : Can't get Accordion Content script to work in Joomla 1.5



skella
03-13-2008, 11:40 AM
Can someone please help. I am trying to get the Accordion Content script to work in Joomla 1.5 but i'm having trouble.

I tried the script in a standard html page and it works fine.

With Joomla i can't get it to do anything. I copied the relevant <head> code into the <head> section of the template HTML and then use the class references in the actual Article HTML.

Any suggestions anyone?

ddadmin
03-13-2008, 10:06 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Please post a link to the page on your site that contains the problematic script so we can check it out.

skella
03-27-2008, 01:50 AM
Sorry about that...

Script: DD Accordion Content
http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

Link to page that's having problems here (http://www.mortgageservices.com.au/joomla/faq/14-our-services/27-are-you-a-member-of-the-mfaa)

I posted a forum topic in my RocketTheme Template Club (http://www.rockettheme.com/option,com_smf/Itemid,190/topic,30825.new/#new) and they suggested that I look at the page with Firebug (http://getfirebug.com) which is awesome little tool. Firebug gave the following error: $("." + config.headerclass) has no properties (in line 85 of ddaccordion.js). Anybody have a clue?

skella
03-27-2008, 04:05 AM
OK I fixed it using this thread... http://www.dynamicdrive.com/forums/showthread.php?t=30501&highlight=accordion

beachgeek
09-18-2009, 08:16 AM
I was having issues with the same script and joomla 1.5 as well...

Script: DD Accordion Content Script (v1.7)
http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

Here is the content page I am working with
http://baybreezescuba.com/index.php?option=com_content&view=article&id=58&Itemid=69#

One issue was the script placement and no reference to it.

I added this to the head and it works fine now:

<script type="text/javascript" src="/media/system/js/ddaccordion.js">

<?php
$document = &JFactory::getDocument();
$document->addScript( '/media/system/js/ddaccordion.js' );
?>

This page was very helpful:
http://docs.joomla.org/Adding_JavaScript#Adding_JavaScript

I started to post for help but found the answer so I thought I would add this to the thread to hopefully save someone the two or three hours I spent working on it...

Mace donio
06-01-2010, 05:45 AM
I only recommend writing your own if you have knowledge of HTML, CSS and understand about compressed and zipped files and extensions. One mistake can throw the whole website guide out of whack because all folders, files and the alike have to work together in the way that the version's core functionality is designed; otherwise, your layout and features will either look "funny" or simply won't work at all. There is, however, software programs available that will allow someone will little knowledge of these aspects to write their own templates.