Accordion did not collapse/expand

idina ishak
Topic Author
Posts: 1
6 years 5 months ago - 6 years 5 months ago #744 by idina ishak
Accordion did not collapse/expand was created by idina ishak
Hi im a newbie here, using joomla 3.0, dload jj accordion but it did not working well. click at the arrow but nothing happen. the article did not collapse or expand. please.. any advice?
Last edit: 6 years 5 months ago by idina ishak.

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1171
6 years 5 months ago #745 by Lodder
Replied by Lodder on topic Accordion did not collapse/expand
Hi Idina,

Would you be able to provide a link to your website so I can have a look at the issue? It could possibly be that you have multiple jQuery liraries being loaded on your website which might cause conflicts. If you would like to send us your website link via e-mail for privacy, you can do that too.

This email address is being protected from spambots. You need JavaScript enabled to view it.

Regards,
Lodder

Please Log in or Create an account to join the conversation.

panter011
Posts: 4
6 years 2 months ago #1605 by panter011
Replied by panter011 on topic Accordion did not collapse/expand
Hello I am having the same problem.
url: infotalqual.com

accordion does not work

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1171
6 years 2 months ago #1606 by Lodder
Replied by Lodder on topic Accordion did not collapse/expand
Hi panter11,

I've had a look at your site. You appear to be using Joomla 3.x howeevr when inspecting the site using Firefuc, none of the javascript files that come packed with Joomla 3.x are being imported. It seems that you have either manually removed them and hacked into the core Joomla code, or you have an extension that is doing this.

The accordion requires jQuery to work which is loaded using the following:
JHtml::_('jquery.framework');

If jQuery is not detected already, this code will import it.

You need to reverse any changes you have made to your site that involves disabling the core Javascript files.

Regards,
Lodder

Please Log in or Create an account to join the conversation.

panter011
Posts: 4
6 years 2 months ago #1607 by panter011
Replied by panter011 on topic Accordion did not collapse/expand
i have reversed back (disabled scriptmerge plugin)
problem persists.

where should i paste that code?
JHtml::_('jquery.framework');

thanks

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1171
6 years 2 months ago #1608 by Lodder
Replied by Lodder on topic Accordion did not collapse/expand
Hi panter11,

could you go open the following file:
modules/mod_accordion/mod_accordion.php

go to line 96-118 and you will see this code:
(function($){
   $(document).ready(function(){

      $('.jjaccordion-header').toggleClass('inactive-header');

      " . $open . "

      $('.jjaccordion-header').click(function () {
         if($(this).is('.inactive-header')) {
            $('.active-header').toggleClass('active-header').toggleClass('inactive- header').next().slideToggle('fast').toggleClass('open-content');
            $(this).toggleClass('active-header').toggleClass('inactive-header');
            $(this).next().slideToggle('fast').toggleClass('open-content');
         }
         else {
            $(this).toggleClass('active-header').toggleClass('inactive-header');
            $(this).next().slideToggle('fast').toggleClass('open-content');
         }
      });
      return false;
   });
})(jQuery);

replace it with this:
jQuery(document).ready(function($){
      $('.jjaccordion-header').toggleClass('inactive-header');

      " . $open . "

      $('.jjaccordion-header').click(function () {
         if($(this).is('.inactive-header')) {
            $('.active-header').toggleClass('active-header').toggleClass('inactive- header').next().slideToggle('fast').toggleClass('open-content');
            $(this).toggleClass('active-header').toggleClass('inactive-header');
            $(this).next().slideToggle('fast').toggleClass('open-content');
         }
         else {
            $(this).toggleClass('active-header').toggleClass('inactive-header');
            $(this).next().slideToggle('fast').toggleClass('open-content');
         }
      });
      return false;
});

Let me know if the accordion then works.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum