-
AuthorPosts
-
edd Friend
edd
- Join date:
- May 2006
- Posts:
- 350
- Downloads:
- 11
- Uploads:
- 73
- Thanks:
- 76
- Thanked:
- 8 times in 2 posts
May 4, 2015 at 1:00 pm #206069Hi there,
Is it possible by default, that accordion could be closed?
Actually when I use Accordion it displays the first content, so I need that it could be closed.
If so, where can I do this?
In the manager is not possible to set.
Is it possible that when I click on the same title it close and opens?Other question:
I was wandering if it is possible to use the accordion style for to display HTML content.
I mean, to usit like a plugin that displays content (like the tabs plugin).Thanks a lot
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 5, 2015 at 2:49 pm #569540If you want to change accordion could be closed by default, you can do this way
Open templates/ja_mitius/html/mod_jaaccordion/default.php file
find and change
<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>
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: false,
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>
JA Accordion module can load custom HTML module and you can follow userguide for do this here
1 user says Thank You to Ninja Lead for this useful post
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by edd 9 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum