I am toggling one element and at that time, want to bind style another element. But I didn't understand how to achieve this with @click
data(){
return {
show:false,
filterStyle: {
top: 0,
background: "#dfe4ea",
marginTop: "15px",
marginBottom: "15px",
},
}
}
methods: {
closing(){
this.show = !this.show
},
}
<p class="closeMap" @click="closing()">close</p>
closing div below.
<div v-show="!show"></>
changing styles div below.
<div :style="filterStyle" class="filter"></div>
Is there someone can explain it to me?
Edit: By the way, as you see I am binding my styles, no problem with that. But not by @click... I want to bind those styles by @click.