Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Norbertho's avatar

Vue Js get the div id on mouseover

Hi, I would like to get the div id on mouseover. It not woprking for me.

<div id="foo"  @mouseover="getinfo($event);" > blabla</div>
        getinfo: function(e){
            targetId = e.target.id;
            console.log(targetId);
        },
0 likes
1 reply
jlrdw's avatar

Try

@mouseover.native=
1 like

Please or to participate in this conversation.