vue.js reference div id on v-on:click
You can extend your event handler with the event object $event. That should fit your needs: <div id=”foo” v-on:click=”select($event)”>…</div> The event is passed on in javascript: export default { methods: { select: function(event) { targetId = event.currentTarget.id; console.log(targetId); // returns ‘foo’ } } } As mentioned in the comments, `$event` is not strictly necessary, when … Read more