Tagged: Accordion animation, accordion toggle
Hi guys,
The deeper I go into enfold the more I like it. So much scope for making very bespoke interfaces.
New question. When clicking on an accordion item, it’s contents snap open, but when clicking on it again, it’s contents slide up to close.
This is a little inconsistent. Is there anyway to make an accordion’s contents both *slide* open and slide closed using the same animation effect?
Thanks,
G
Hey Glyphism!
Open css/shortcodes.css and remove/comment line 930:
/*display:block;*/
Cheers!
Josue
Thankyou perfect that did it
You are welcome, glad we could help :)
Regards,
Josue
I want the same thing, but now there is no /*display:block;*/ in the shortcodes.css
How can i do the same in this last version?
Thanks!
Hi!
Search for display:block; only, the /* */ is the code for commenting out what is inside of it.
Cheers!
Rikard
For me works this:
-Coment line 1165
.active_tc.toggle_wrap{
/*display:block;*/
}
(I think is the same you explain, but change in the last version of enfold)
Thanks!
Hi,
how can we change the behavior without editing shortcodes.css?
we want to change thet in the css of child template…
thx
Chris
Hi,
Try adding this in your child theme’s style.css or in Quick CSS:
.active_tc.toggle_wrap {
display: none;
}
Then add this code to functions.php (this is for toggles that are opened by default which is affected by the css I gave above):
function add_custom_script(){
?>
<script type="text/javascript">
(function($){
function custom_toggle() {
jQuery("#top").find(".active_tc.toggle_wrap").css("display","block");
}
custom_toggle();
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Best regards,
Nikko