Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1083993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:30:21+00:00 2026-05-16T22:30:21+00:00

I am developing a web app using the Joomla Framework. The jQuery UI accordion

  • 0

I am developing a web app using the Joomla Framework. The jQuery UI accordion function is not working for me. The error reported by Firebug is that .accordion is not a function. I have read a lot of pages addressing various similar errors but have not found a solution.

Here is what I have in the template for my component’s view:

$document =& JFactory::getDocument();    
$document->addScript( '/includes/js/jquery-1.4.2.js' );  
$document->addScript( '/includes/js/jquery-ui-1.8.4.custom.min.js' );
JHTML::script( 'includes/js/pfm_main_ui.js', '' );
$document->addCustomTag( '<script type="text/javascript">jQuery.noConflict();</script>'    );

Here is my included javascript (pfm_main_ui.js):

jQuery(document).ready(function() {  
   jQuery('#accordion').accordion(  
        {  
            header: "h2"
        });  
      })

Here is the html for the accordion in the template:

 <div id="accordion">
 <div>
 <h2><a href="#">Header 1</a></h2>
 <div id="contentPanel_1">...content ...
 </div>
 </div>
 <div>
 <h2><a href="#">Header 2</a></h2>
 <div id="contentPanel_2">...content ...
 </div>
 </div>
 <div>
 <h2><a href="#">Header 3</a></h2>
 <div id="contentPanel_3">...content ...
 </div>
 </div>
 <div>
 <h2><a href="#">Header 4</a></h2>
 <div id="contentPanel_4">...content ...
 </div>
 </div>
 </div>

Other info:

Joomla by default uses mootools, so I have to call jQuery.noConflict() to use jQuery. I believe this may be where the error is coming from, but cannot solve. Any help is much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:30:21+00:00Added an answer on May 16, 2026 at 10:30 pm

    A few thoughts:

    1. What does the HTML look like with a quick view source? (Ctrl+U in FF and Chrome) Are the javascript files being loaded in the correct order?

    2. The custom JQuery UI javascript file referenced by jquery-ui-1.8.4.custom.min.js may not contain the class declaration for the Accordion UI component. Try loading the full JQuery UI library from a CDN (here Microsoft’s: http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/jquery-ui.min.js) and see if that corrects the error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a forms app (not web) for Windows Mobile, using .NET CF
I am developing a web-app using zend framework. I like how all the autoloading
I am developing a web app using silverlight. I read that Microsoft offers 10
I am developing a web app (using rails) that I will be launching within
We're developing a web app using the Zend framework and Mysql. Currently, accounts are
I'm developing a web-app in Rails using jQuery where a lot of the processing
I'm developing a web app in asp.net mvc using jquery, the language of application
I'm developing a website. I'm using a single-page web-app style, so all of the
I am developing a web app using ASP.NET 2.0 (C#), where on home page
I'm developing a web app using Django, and I'll need to add search functionality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.