title: Set an accordion menu default to show the content instead of hiding it in Liquid
body: <p>On the side bar of my product pages there are filters within an accordian style menu. 
  <strong>Preview:</strong> <a href="https://www.shoplovestitch.com/collections/new-arrival-dresses" rel="nofollow noreferrer">https://www.shoplovestitch.com/collections/new-arrival-dresses</a></p>
  
  <p>I'm trying to make the accordion menu's for filters default to be unhidden/open instead of defaulting to closed.</p>
  
  <pre><code>{% comment %} *** FILTER BY *** {% endcomment %}
  {% if collection.products.size &gt; 0 %}
  
  &lt;h4 class="sidebar-title collapsed" data-toggle-target="sidebar-filter-group"&gt;
    Filter By
    &lt;i class="fa fa-angle-up" aria-hidden="true"&gt;&lt;/i&gt;
  &lt;/h4&gt;
  
  &lt;div id="sidebar-filter-group" class="sidebar-group"&gt;
  
    {% comment %} *** FILTER BY SIZE *** {% endcomment %}
    {% assign size_tags = settings.collection_sidebar_size_tags | strip_newlines | replace: ' ,', ',' | replace: ', ', ',' | split: ',' %}
  
    {% assign filters_selected_tags = '' %}
    {% for size_tag in size_tags %}
      {% assign tag_search = size_tag | replace: '-', ' ' %}
      {% if current_tags contains tag_search %}
        {% assign filters_selected_tags = filters_selected_tags | append: tag_search | append: ',' %}
      {% endif %}
    {% endfor %}
    {% assign filters_selected_tags = filters_selected_tags | split: ',' %}
  
    &lt;div class="accordian-group" data-selected-count="{{ filters_selected_tags.size }}"&gt;
      &lt;div class="accordian-heading"&gt;
        &lt;a class="collapsed" href="#"&gt;{{ settings.collection_sidebar_size_title }}&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="accordian-body"&gt;
        {% if filters_selected_tags.size &gt; 0 %}
  
          {% assign current_tags_modifier = '' %}
          {% for t in current_tags %}
            {% unless filters_selected_tags contains t %}
              {% assign h = t | handle %}
              {% assign current_tags_modifier = current_tags_modifier | append: h | append: ',' %}
            {% endunless %}
          {% endfor %}
          {% assign current_tags_modifier = current_tags_modifier | split: ',' | join: '+' %}
  
          {% assign clear_selected_url = collection.url | append: '/' | append: current_tags_modifier %}
  
          &lt;div class="clear-selected"&gt;
            &lt;a href="{{ clear_selected_url }}"&gt;
              &lt;i class="fa fa-times-circle" aria-hidden="true"&gt;&lt;/i&gt; Clear {{ settings.collection_sidebar_size_title }}
            &lt;/a&gt;
          &lt;/div&gt;
        {% endif %}
  
        &lt;ul class="multi-select buttons"&gt;
          {% for size_tag in size_tags %}
  
            {% assign tag_name = size_tag %}
            {% assign tag_search = tag_name | replace: '-', ' ' %}
            {% capture link_html %}
              {% if current_tags contains tag_search %}
                {{ tag_name | link_to_remove_tag: tag_search }}
              {% else %}
                {{ tag_name | link_to_add_tag: tag_search }}
              {% endif %}
            {% endcapture %}
  
            {% assign link_href = '' %}
            {% assign link_html = link_html | escape %}
            {% if link_html contains 'href=&amp;quot;' %}
              {% assign link_html = link_html | split: 'href=&amp;quot;' %}
              {% assign link_html = link_html[1] | split: '&amp;quot;' %}
              {% assign link_href = link_html[0] %}
            {% endif %}
  
            {% if collection.tags contains tag_name %}
              &lt;li&gt;
                {% if current_tags contains tag_search %}
                  &lt;a class="active" title="{{ tag_name }}" href="{{ link_href }}"&gt;{{ tag_name }}&lt;/a&gt;
                {% else %}
                  &lt;a title="{{ tag_name }}" href="{{ link_href }}"&gt;{{ tag_name }}&lt;/a&gt;
                {% endif %}
              &lt;/li&gt;
            {% endif %}
          {% endfor %}
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    {% comment %} *** FILTER BY COLOR *** {% endcomment %}
    {% assign color_tags = settings.collection_sidebar_color_tags | strip_newlines | replace: ' ,', ',' | replace: ', ', ',' | split: ',' %}
  
    {% assign filters_selected_tags = '' %}
    {% for color_tag in color_tags %}
      {% assign tag_search = color_tag | replace: '-', ' ' %}
      {% if current_tags contains tag_search %}
        {% assign filters_selected_tags = filters_selected_tags | append: tag_search | append: ',' %}
      {% endif %}
    {% endfor %}
    {% assign filters_selected_tags = filters_selected_tags | split: ',' %}
  
    &lt;div class="accordian-group" data-selected-count="{{ filters_selected_tags.size }}"&gt;
      &lt;div class="accordian-heading"&gt;
        &lt;a class="collapsed" href="#"&gt;{{ settings.collection_sidebar_color_title }}&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="accordian-body"&gt;
        {% if filters_selected_tags.size &gt; 0 %}
  
          {% assign current_tags_modifier = '' %}
          {% for t in current_tags %}
            {% unless filters_selected_tags contains t %}
              {% assign h = t | handle %}
              {% assign current_tags_modifier = current_tags_modifier | append: h | append: ',' %}
            {% endunless %}
          {% endfor %}
          {% assign current_tags_modifier = current_tags_modifier | split: ',' | join: '+' %}
  
          {% assign clear_selected_url = collection.url | append: '/' | append: current_tags_modifier %}
  
          &lt;div class="clear-selected"&gt;
            &lt;a href="{{ clear_selected_url }}"&gt;
              &lt;i class="fa fa-times-circle" aria-hidden="true"&gt;&lt;/i&gt; Clear {{ settings.collection_sidebar_color_title }}
            &lt;/a&gt;
          &lt;/div&gt;
        {% endif %}
  
        &lt;ul class="multi-select color-swatches"&gt;
          {% for color_tag in color_tags %}
            {% assign color_swatch_src = color_tag | handle | prepend: 'swatch-' | append: '_icon.png' %}
            {% capture color_swatch %}
              &lt;div class="swatch-border"&gt;
                &lt;img src="{{ color_swatch_src | file_url }}" alt="{{ color_tag | escape }}" /&gt;
              &lt;/div&gt;
            {% endcapture %}
  
            {% assign tag_name = color_tag %}
            {% assign tag_search = tag_name | replace: '-', ' ' %}
            {% capture link_html %}
              {% if current_tags contains tag_search %}
                {{ tag_name | link_to_remove_tag: tag_search }}
              {% else %}
                {{ tag_name | link_to_add_tag: tag_search }}
              {% endif %}
            {% endcapture %}
  
            {% assign link_href = '' %}
            {% assign link_html = link_html | escape %}
                  {% if link_html contains 'href=&amp;quot;' %}
                      {% assign link_html = link_html | split: 'href=&amp;quot;' %}
                      {% assign link_html = link_html[1] | split: '&amp;quot;' %}
                      {% assign link_href = link_html[0] %}
                  {% endif %}
  
            {% if collection.tags contains tag_name %}
              &lt;li&gt;
                {% if current_tags contains tag_search %}
                  &lt;a class="active" title="{{ tag_name }}" href="{{ link_href }}"&gt;{{ color_swatch }}&lt;/a&gt;
                {% else %}
                  &lt;a title="{{ tag_name }}" href="{{ link_href }}"&gt;{{ color_swatch }}&lt;/a&gt;
                {% endif %}
              &lt;/li&gt;
                          {% endif %}
          {% endfor %}
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    {% comment %} *** FILTER BY PRICE *** {% endcomment %}
    {% assign price_tags = settings.collection_sidebar_price_tags | strip_newlines | replace: ' ,', ',' | replace: ', ', ',' | split: ',' %}
  
    {% assign filters_selected_tags = '' %}
    {% for price_tag in price_tags %}
      {% assign tag_search = price_tag | replace: '-', ' ' %}
      {% if current_tags contains price_tag %}
        {% assign filters_selected_tags = filters_selected_tags | append: price_tag | append: ',' %}
      {% endif %}
    {% endfor %}
    {% assign filters_selected_tags = filters_selected_tags | split: ',' %}
  
    &lt;div class="accordian-group" data-selected-count="{{ filters_selected_tags.size }}"&gt;
      &lt;div class="accordian-heading"&gt;
        &lt;a class="collapsed" href="#"&gt;{{ settings.collection_sidebar_price_title }}&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="accordian-body"&gt;
        {% if filters_selected_tags.size &gt; 0 %}
  
          {% assign current_tags_modifier = '' %}
          {% for t in current_tags %}
            {% unless filters_selected_tags contains t %}
              {% assign h = t | handle %}
              {% assign current_tags_modifier = current_tags_modifier | append: h | append: ',' %}
            {% endunless %}
          {% endfor %}
          {% assign current_tags_modifier = current_tags_modifier | split: ',' | join: '+' %}
  
          {% assign clear_selected_url = collection.url | append: '/' | append: current_tags_modifier %}
  
          &lt;div class="clear-selected"&gt;
            &lt;a href="{{ clear_selected_url }}"&gt;
              &lt;i class="fa fa-times-circle" aria-hidden="true"&gt;&lt;/i&gt; Clear {{ settings.collection_sidebar_price_title }}
            &lt;/a&gt;
          &lt;/div&gt;
        {% endif %}
  
        &lt;ul class="multi-select list"&gt;
          {% for price_tag in price_tags %}
  
            {% assign tag_name = price_tag %}
            {% assign tag_search = tag_name | replace: '-', ' ' %}
  
            {% capture link_html %}
              {% if current_tags contains tag_name %}
                {{ tag_name | link_to_remove_tag: tag_name }}
              {% else %}
                {{ tag_name | link_to_add_tag: tag_name }}
              {% endif %}
            {% endcapture %}
  
            {% assign link_href = '' %}
            {% assign link_html = link_html | escape %}
            {% if link_html contains 'href=&amp;quot;' %}
              {% assign link_html = link_html | split: 'href=&amp;quot;' %}
              {% assign link_html = link_html[1] | split: '&amp;quot;' %}
              {% assign link_href = link_html[0] %}
            {% endif %}
  
            {% if collection.tags contains tag_name %}
              &lt;li&gt;
                {% if current_tags contains tag_name %}
                  &lt;a class="active" title="{{ tag_name }}" href="{{ link_href }}"&gt;{{ tag_name }}&lt;/a&gt;
                {% else %}
                  &lt;a title="{{ tag_name }}" href="{{ link_href }}"&gt;{{ tag_name }}&lt;/a&gt;
                {% endif %}
              &lt;/li&gt;
            {% endif %}
          {% endfor %}
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    {% comment %} *** SORT BY *** {% endcomment %}
    &lt;div class="sidebar-sort"&gt;
      &lt;div class="accordian-group" data-selected-count="0"&gt;
        &lt;div class="accordian-heading"&gt;
          &lt;a class="collapsed" href="#"&gt;Sort By&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="accordian-body"&gt;
          {% include 'collection-toolbar' %}
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  { % endif %}
  </code></pre>