AnsweredAssumed Answered

how can i show subpanels collapsed in community version

Question asked by Óscar del Río on Jan 30, 2017
Latest reply on Feb 1, 2017 by Bhavin Patel

Hi everyone.

 

I need to show collapsed all subpanels in contacts' detailview by default.

Actually i use jquery to do this action, but i think that there should be another more elegant way to do it.

My jquery code:
$(document).ready(function(){
    $('#hide_link_contacts_oms2b_pagocuotas_1').click(function() {
         $('#list_subpanel_contacts_oms2b_pagocuotas_1').hide();
    })
    $('#show_link_contacts_oms2b_pagocuotas_1').click(function() {
         $('#list_subpanel_contacts_oms2b_pagocuotas_1').show();
    })    
    if  (!$('#list_subpanel_contacts_oms2b_pagocuotas_1').is(':hidden')){
        $('#hide_link_contacts_oms2b_pagocuotas_1').trigger('click');
        $('#show_link_contacts_oms2b_pagocuotas_1').show();
        $('#hide_link_contacts_oms2b_pagocuotas_1').hide();
    }
    
});
Thank you very much in advance.
 

Outcomes