Menu
×
×
Correct!
Exercise:Complete the code so that the image toggles when the button is clicked.
<template>
<button @(10)="showImg = !showImg">
Toggle image
</button>
<img src="flower.jpg" alt="flower" v-show="showImg">
</template>
<script>
export default {
data() {
return {
@(7): true
}
}
}
</script>
<template>
<button v-on:click="showImg = !showImg">
Toggle image
</button>
<img src="flower.jpg" alt="flower" v-show="showImg">
</template>
<script>
export default {
data() {
return {
showImg: true
}
}
}
</script>
<template>
<button @:click="showImg = !showImg">
Toggle image
</button>
<img src="flower.jpg" alt="flower" v-show="showImg">
</template>
<script>
export default {
data() {
return {
showImg: true
}
}
}
</script>
Not CorrectClick here to try again. Correct!Next ❯ |
This will reset the score of ALL 54 exercises.
Are you sure you want to continue?