Getting Started with Vue.js: #13 Vue Event - Build an Accordion

preview_player
Показать описание
We'll continue using Vue to listen for HTML events by building out an accordion. By combining Vue's ability to add and remove classes with some CSS styles, we can quickly create a working accordion.

To get us started, we'll be using a Bulma message as our accordion. Whenever a user clicks the message header, then we'll apply an is-closed class to the message with Vue.

Рекомендации по теме
Комментарии
Автор

I think you can toggle a class in vanilla JS.

avirbd
Автор

I loved the video, I found it super explanatory! I loved the cursive letter in the attributes and functions, do you use any extension to make it like this?

danigonzalez
Автор

How would I do this for multiple Accordions? Every time I open one accordion it opens all of them

jeremyccc
Автор

doesnt work with vue 3, data has to be a function

coredeadman
join shbcf.ru