I
I
ilysion_in_life2018-10-02 12:37:28
JavaScript
ilysion_in_life, 2018-10-02 12:37:28

How to keep the accordion open in the same place when clicking on a link inside it?

Hello

, can you tell me, I have a menu, here it is https://pastebin.com/0hzn2Cme , how can I make it so that when I click on the parent category, it goes into it and at the same time the subcategories do not close in the menu, but the one they switched to is open?
here is another code from the opencart template

<div class="col-md-3">
    <div class="shop-categor">
  {% for category in categories %}	
        <div class="shop-categor-item">
            <div class="shop-categor-title active">{{ category.name }}
      <div class="shop-close">
        <span class="l1"></span>
        <span class="l2"></span>
      </div></div>
      {% for child in category.children %}
      <div class="shop-categor-wr">
                <label><a href="{{ child.href }}" >{{ child.name }}</a></label>
      </div>
      {% endfor %} 
        </div>
    {% endfor %}
    </div>	
</div>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question