• Resolved redkite

    (@redkite)


    Is there a way to set the state by screen size so that all items are initially open on desktop, but all closed on mobile?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    There is no way built into the plugin, but you could use some JavaScript to achieve what you are looking for. Something like this should work as a starting point:

    jQuery(document).ready(function($) {
        if ($(window).width() > 480) {
            $.each($('.accordion-title'), function(index, value) {
                if (!$(this).hasClass('open')) {
                    $(this).click();
                }
            });
        }
    });
    Thread Starter redkite

    (@redkite)

    Thanks, I’ll give that a try.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘All open on desktop, closed on mobile?’ is closed to new replies.