-
AuthorPosts
-
rypetry Friend
rypetry
- Join date:
- March 2011
- Posts:
- 49
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 12
- Thanked:
- 4 times in 1 posts
November 4, 2013 at 3:32 pm #191971I’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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 5, 2013 at 10:40 am #511246You 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> -
AuthorPosts
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