-
AuthorPosts
-
April 9, 2014 at 9:57 am #31557
Antonela DParticipantHi, I want to set the option of “expand all” and “close all” for the accordions.
Thanks.
April 9, 2014 at 9:57 am #31558
Antonela DParticipantThis reply has been marked as private.April 9, 2014 at 4:37 pm #31762
RadModeratorHi Antonela,
You could do this by adding this javascript under Customizer > Custom > Javascript .
Let say you add expand and collapse all button at your editor
<a href="#" class="expandall_accord">Expand All</a> | <a href="#" class="collapseall_accord">Collapse All</a>jQuery('.expandall_accord').on('click', function(){ jQuery('.accordion-body').collapse('show'); }); jQuery('.collapseall_accord').on('click', function(){ jQuery('.accordion-body').collapse('hide'); });Hope this helps.
April 10, 2014 at 9:32 am #32038
Antonela DParticipantThanks!
April 10, 2014 at 12:35 pm #32134
AlexanderKeymasterYou’re welcome! Take care
October 25, 2015 at 7:53 pm #639291
sndesignParticipantVery helpful – thank you!
October 25, 2015 at 9:41 pm #639368
John EzraMemberYou’re most welcome!
April 8, 2016 at 12:04 pm #873088
sndesignParticipantThis reply has been marked as private.April 9, 2016 at 2:58 am #873853
RadModeratorHi there,
Please update your javascript code to this,
jQuery ( function($) { $('.expandall_accord').on('click', function( e ){ $('.x-accordion-body').collapse('show'); e.preventDefault(); }); $('.collapseall_accord').on('click', function( e ){ $('.x-accordion-body').collapse('hide'); e.preventDefault(); }); } );Cheers!
April 9, 2016 at 10:52 am #874250
sndesignParticipantThanks – that worked like a charm!
April 10, 2016 at 12:18 am #874810
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-31557 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
