Bootstrap collapse

Vragen over componenten, modules en plugins die op Joomla! 3.x draaien.

Moderator: pe7er

Forum rules
Forum Regels
Locked
Lodeke87
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Nov 19, 2013 3:49 pm

Bootstrap collapse

Post by Lodeke87 » Mon Feb 13, 2017 10:24 am

Hi I made a website and used a module named Bootstrap collapse. When I load the page, the accordion is allready collapsed. How can I make them all closed when I load the page.

This is the code from: mod_bootstrap_collapse.php

Code: Select all

defined('_JEXEC') or die;

// Include the syndicate functions only once
require_once __DIR__ . '/helper.php';

$menu = JMenu::getInstance('site');

$app    = JFactory::getApplication(); 
$doc = JFactory::getDocument();
$document =& $doc;
$list = modArticlesNewsAdvHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));

require JModuleHelper::getLayoutPath('mod_bootstrap_collapse', $params->get('layout', 'default'));
$document->addStyleSheet('modules/mod_bootstrap_collapse/css/style.css');
$document->addScriptdeclaration(';(function($){
	  $(document).ready(function(){
	    $(".accordion").collapse();
	    $("#accordion'.$module->id.' .panel-heading").on("click",function(){
			$("#accordion'.$module->id.'").find(".panel").each(function(){
				$(this).removeClass("active");
			})

			if($(this).parent(\'.panel\').find(\'.panel-collapse\').hasClass(\'in\')){
				$(this).parent(\'.panel\').removeClass(\'active\');
			} else {
				$(this).parent(\'.panel\').addClass(\'active\');
			}
			
			$(this).closest(\'.accordion-group\').toggleClass("selected");
			$(this).toggleClass("selected");
		});	
	  });


})(jQuery);');
Thanks!

Regards

 
 
Locked

Return to “Extensies 3.x”