Is it possible to make the Canvas accordions collapsible again after being opened? Similar to how the Bootstrap Accordions work
Accodions - collapsible: true
3 replies · opened Aug 28, 2019
TthemepackAug 28, 2019
SSemicolon WebSTAFFAug 28, 2019
Hello,
Find the following code inside the accordions: function() Function Block in the js/functions.js File:
element.find('.acctitle').off( 'click' ).on( 'click', function(){
if( $(this).next().is(':hidden') ) {
element.find('.acctitle').removeClass('acctitlec').next().slideUp("normal");
var clickTarget = $(this);
$(this).toggleClass('acctitlec').next().stop().slideDown("normal", function(){
if( ( $body.hasClass('device-sm') || $body.hasClass('device-xs') ) && element.hasClass('scroll-on-open') ) {
$('html,body').stop(true).animate({
'scrollTop': clickTarget.offset().top - ( SEMICOLON.initialize.topScrollOffset() - 40 )
}, 800, 'easeOutQuad' );
}
});
}
return false;
});and replace it with:
element.find('.acctitle').off( 'click' ).on( 'click', function(){
if( $(this).next().is(':hidden') ) {
element.find('.acctitle').removeClass('acctitlec').next().slideUp("normal");
var clickTarget = $(this);
$(this).toggleClass('acctitlec').next().stop().slideDown("normal", function(){
if( ( $body.hasClass('device-sm') || $body.hasClass('device-xs') ) && element.hasClass('scroll-on-open') ) {
$('html,body').stop(true).animate({
'scrollTop': clickTarget.offset().top - ( SEMICOLON.initialize.topScrollOffset() - 40 )
}, 800, 'easeOutQuad' );
}
});
} else {
$(this).toggleClass('acctitlec').next().stop().slideUp("normal");
}
return false;
});This will definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
TthemepackAug 28, 2019
Oh my god! Awesome thank you! I wish I knew more jquery like you. 10/10 support - again!
SSemicolon WebSTAFFAug 29, 2019
Hello,
Really Glad that your issues were resolved. Very Happy to help you! :)
Do let us know if we can help you with anything else or if you find any further issues with Canvas.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard