-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
I got a list of users
which are displayed with v-repeat
.
HTML:
<ul id="vue">
<li v-repeat="user in users" v-on="click: onClick(user)">@{{ user.name }}</li>
</ul>
JavaScript:
new Vue({
el: '#vue',
data: {
users: [
{ name: 'Berta' },
{ name: 'Delta' },
{ name: 'Anton' },
{ name: 'Echo' },
{ name: 'Charlie' }
]
},
methods: {
onClick: function(user) {
// Perform jQuery actions on DOM element like:
// if($(this).hasClass('active')) { ... }
// $(this).effect('shake)';
}
}
});
How can I access the corresponding DOM
element to the clicked user
? I want to perform some jQuery actions...
Thanks a lot! :-)
Metadata
Metadata
Assignees
Labels
No labels