Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #136900

    fmaweb
    Participant

    On our page http://annualmeeting.fmanet.org/become-a-sponsor/ They want the accordion
    items all open for the website. For mobile however it would be better to have them all collapsed. Is the best method to do this to just duplicate the band and use a visibility tag?

    #137071

    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    For now, leave them open, then add this code at your customizer’s custom javascript to close them on mobile.

    jQuery(function($){ 
    
    $(document).ready(function(){ 
    
    $('html.touch .collapse').collapse('hide');
    
    });
    
    });

    Cheers!

    #137564

    fmaweb
    Participant

    Beautiful Thanks!

    #137602

    Cousett
    Member

    Glad we were able to help. 🙂 Have a nice day.

    #138323

    fmaweb
    Participant

    I notice now the mobile menu starts open. The code is affecting it as well. Can you help me target just the Accordion on the Become a sponsor page?

    #138363

    fmaweb
    Participant

    Trying to figure the syntax out lol

    jQuery(function($){

    $(document).ready(function(){

    $( “#sponsor-levels” ).(‘html.touch .collapse’).collapse(‘hide’);

    });

    });

    #138394

    fmaweb
    Participant

    Got it.

    jQuery(function($){

    $(document).ready(function(){

    $(‘html.touch #sponsor-levels .collapse’).collapse(‘hide’);

    });

    });

    #138402

    Zeshan
    Member

    Glad to hear you were able to resolve it! 🙂 Have a good day!