Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • rypetry Friend
    #191971

    I’m trying to get the JA Accordian module to hide the first item when the page loads. It’s current the default for the module to open the first item automatically and I want the visitor to have to click it in order to activate the expansion of the content. What is the source file and what is the code I should modify or insert – doesn’t seem to be any setting in the Joomla administration panel. Please help!

    Thank you.

    Ninja Lead Moderator
    #511246

    You can try my below solution

    Open templates/ja_mitius/html/mod_jaaccordion/default.php file

    Find


    <script type="text/javascript">
    window.addEvent('domready', function(){
    var myAccordion = new Fx.Accordion($('ja-accordion<?php echo $module->id?>'), $$('.ja-accordion-title<?php echo $module->id?>'), $$('.ja-accordion-content<?php echo $module->id?>'), {
    alwaysHide: true,
    display: 0,
    trigger: '<?php echo $params->get("mouseType", 'click')?>',
    duration: <?php echo intval($params->get('duration'))?>,
    transition: <?php echo trim($params->get('effect', 'Fx.Transitions.Elastic.linear'))?>,
    onActive: function(toggler, element){
    toggler.addClass('active');
    element.addClass('active');
    },
    onBackground: function(toggler, element){
    toggler.removeClass('active');
    element.removeClass('active');
    }
    });
    });
    </script>

    Change to

    <script type="text/javascript">
    window.addEvent('domready', function(){
    var myAccordion = new Fx.Accordion($('ja-accordion<?php echo $module->id?>'), $$('.ja-accordion-title<?php echo $module->id?>'), $$('.ja-accordion-content<?php echo $module->id?>'), {
    alwaysHide: true,
    display: -1,
    trigger: '<?php echo $params->get("mouseType", 'click')?>',
    duration: <?php echo intval($params->get('duration'))?>,
    transition: <?php echo trim($params->get('effect', 'Fx.Transitions.Elastic.linear'))?>,
    onActive: function(toggler, element){
    toggler.addClass('active');
    element.addClass('active');
    },
    onBackground: function(toggler, element){
    toggler.removeClass('active');
    element.removeClass('active');
    }
    });
    });
    </script>

    richnyc30 Friend
    #1084323

    This still works in Jan 2018. The default.php file is in public_html/(If your site is with multiple sites in Cpanel)/modules/mod_jaaccordion/tmpl

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 2 replies, has 3 voices, and was last updated by  richnyc30 6 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum