D
D
danilr2019-06-18 09:28:49
JavaScript
danilr, 2019-06-18 09:28:49

Which accordion plugin and how to use for blocks from loop?

The situation is as follows: there are blocks that are displayed in a cycle. And for each block there should be an accordion (leaving part). In code it should be something like this:

<div v-for="box in boxies">
 <ul>
  <li>1 пункт</li>
  <li>2 пункт</li>
  <li>3 пункт</li>
  <li>4 пункт</li>
  <li>5 пункт</li>
  <li>6 пункт</li>
  <li>7 пункт</li>
</ul>
<button>Подробнее</button>
</div>

First, 4 points should be shown (you can also limit the height covering 4 points), when you click on the button, it will move apart and show everything, when you click again - back.
I know only through one plugin, but there you need to create your own variable for each, but here there can be as many as you like. Please tell me the plugin (how to connect, a project without a faucet and npm on Vuejs) or even your own script.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2019-06-18
@Kozack

https://developer.mozilla.org/ru/docs/Web/HTML/Ele...

S
Secret73, 2019-06-18
@Secret73

https://codesandbox.io/s/vue-template-6wys2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question