Click in order · Vue.js course · Module 2: Template Syntax
v-show Syntax with Toggle
Arrange the syntax: first the toggle button, then the element with v-show below it:
Items to click
- "isVisible = !isVisible">
- Toggle</button>
- <button @click=
- <div v-show="isVisible">Panel</div>
Show the answer
Correct order:
- <button @click=
- "isVisible = !isVisible">
- Toggle</button>
- <div v-show="isVisible">Panel</div>