Vue.js Mouseover Event


Vue.js Mouseover EventIt is very simple to implement the hover functionality in vue.js. Here in this tutorial let us create a simple example of Mouseover event.


Vue.js Mouseover Event- VueJs Example

Here is simple example of vue.js mouseover event-

Vue.js Mouseover Event Example:

<div id="myDiv">
        <div v-show="active">Show</div>
        <div v-on="mouseover: mouseOver">Mouse Hover over to test!</div></div>

var demo = new Vue({
    el: '#myDiv',
    data: {
        active: false
    },
    methods: {
        mouseOver: function(){
            this.active = !this.active;   
        }
    }
});

Advertisements

Add Comment

📖 Read More