[Vuejs]-.toggle () not working with Vue Router

0👍

You can use @click event handler and toggle the class by writing a method for this event. Something like

<div id="menuTopLinks" class="row" @click="mouseOver">

mouseOver: function () {
    var x = document.getElementById("menuTopLinks")
    if (x) {
        x.classList.toggle("extend")
    }
}

Leave a comment