Hi Guys. Using integrity. I am using a short code for an accordian in the side bar.
I want the accordian to be open by default in desktop, and closed by default in responsive view.
Is this possible?
Cheers
Max
Hi Guys. Using integrity. I am using a short code for an accordian in the side bar.
I want the accordian to be open by default in desktop, and closed by default in responsive view.
Is this possible?
Cheers
Max
Hey Max,
That is possible by adding some custom JS to the Global JS area.
Please add this code:
(function($) {
if ($(window).width() < 480) {
$('.x-sidebar .x-accordion-toggle').addClass('collapsed');
$('.x-sidebar .x-accordion-body').addClass('x-collapsed');
}
})(jQuery);
Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates.
Hope this helps.
Thanks so much. Code works perfectly.
You’re welcome! 
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.