Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1262941
    Sam T
    Participant

    Hi I was following the thread below in order to create a accordion collapse link. I got all the way to the end and it looks like there might have been some code that was corrected but that took place in a PM. Could I get that information/fix as well? Currently, it’s acting like a jump link but I would also like the accordion to close. I would like it to close. It’s probably something with the Javascript in customizer but I don’t know what. Thanks guys. Still loving the theme and the support.

    https://community.theme.co/forums/topic/close-accordion-button/

    auministry.com
    Wordpress Version 4.6.1
    Cornerstone Version 1.3.3

    #1263306
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! I have checked the thread and assure you that there was no solution given in a PM. It should have work out for you. I have checked your site and I could figure out which of the link closes an accordion in any given page. Could please provide us the url of the page which has the accordion in question?

    Thank you.

    #1265337
    Sam T
    Participant

    Hi,

    Here’s the link. I hadn’t published it yet. http://auministry.com/academic-programs/ba-in-christian-studies/

    #1265341
    Sam T
    Participant

    Check out the “Ministry Electives (6hrs)” Accordion item just under the “Christian Studies Electives and Concentrations (30hrs)”. The “close” link is at the bottom. I’m trying to get it to close the accordion. I’m probably looking over something simple but I’m at a loss as what I’m missing. Thanks for your help.

    #1265399
    Paul R
    Moderator

    Hi Sam,

    You can try adding this in Custom > Edit Global Javascript in the customizer.

    
    jQuery(function($) {
        $( ".accordion-close" ).on( "click touchend", function() {
           $(this).parent().parent().parent().removeClass('in').prev('.x-accordion-heading').find('.x-accordion-toggle').addClass('collapsed');
        });
    });
    

    Hope that helps.

    #1265400
    Paul R
    Moderator

    Hi Sam,

    You can try adding this in Custom > Edit Global Javascript in the customizer.

    
    jQuery(function($) {
        $( ".accordion-close" ).on( "click touchend", function() {
           $(this).parent().parent().parent().removeClass('in').prev('.x-accordion-heading').find('.x-accordion-toggle').addClass('collapsed');
        });
    });
    

    Hope that helps.

    #1266761
    Sam T
    Participant
    This reply has been marked as private.
    #1266779
    Paul R
    Moderator

    Hi,

    You need to remove the code that reads.

    <script src='https://www.google.com/recaptcha/api.js'></script>

    It shouldn’t be there, as the code in custom js are being wrap in <script></script> already

    so <script><script src=’https://www.google.com/recaptcha/api.js’></script></script&gt; will produce an error.

    I went ahead and remove the code and it seems to work.

    Your google analytics code is also producing an error, kindly double check the code.

    Thanks

    #1266944
    Sam T
    Participant

    Perfect! Thanks Paul.

    #1266982
    Joao
    Moderator

    Glad to hear it,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1262941 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>