Is there a way to prevent the next click for 600ms after an initial click? I want to temporarily "disable" all a tags for 600ms after one is clicked. Any help would be appreciated.
VUE
<ul>
<li v-for="item in navigation" :key="item" :title="item.name">
<router-link :to="item.path" @click="delay()">{{ item.name }}</router-link>
</li>
</ul>
delay()
methods: {
delay() {
this.event.preventDefault();
}
}
EDIT I have made some changes. Now, I want each button to be disabled for 600ms after being clicked before becoming active again. The router should not be included in this timer. I tried something like this but the buttons remain permanently disabled
<ul>
<li v-for="item in navigation" :key="item" :title="item.name">
<button type="button" disabled="false" @click="delay(item.path)">{{ item.name }}</button>
</li>
</ul>
method
methods: {
delay(to) {
this.$router.push(to);
setTimeout(() => this.disabled = true, 600)
},
},