Skip to content
Advertisement

Mouse Hover in VueJS component implementation in Laravel

My Mouse hover is not working when I am using it on Laravel.

My Vue file is stored in resources/js/Dashboard.vue

What I tried so far is to change v-on:mouseover with @mouseover but it still not working.

The Result is that when I hover the button it doesn’t change texts.

What am I doing wrong and how can I fix it?

Below, the content of my Dashboard.vue file;

JavaScript

Here, the content of my Blade.php file;

JavaScript

To take a close look and reproduce locally, below is the package.json file;

JavaScript

Edit added my app.js

JavaScript

Advertisement

Answer

The answer is that i should put

JavaScript

in resources/views/layouts/app.blade.php instead of putting it in my other view file such as those i manually created. For those wondering where in app.blade.php should i put the code above.Put it at the end of the body tag

For example in app.blade.php

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement