you know that we can use on events for a class in JQuery. for instance
$(".example").click(function(){
//the process
})
I am new on Vue.js and I am working on methods in vue.js Vue use v-on attr to set a method for a element. But I dont want to define attr for all elements whichs use same function.
For Example
<ul class="container">
<li v-on="click:Menu" >Menu 1</li>
</ul>
<ol class="click">
<li v-on="click:Menu" >Menu 1</li>
<li v-on="click:Menu" >Menu 2</li>
</ol>
You must saw, I used v-on attr for all li elements. For li elements it is not problem, I can solve it v-repeat but for some cases, I have to set same function for lots of divs or form. I want to set a class for a function and set a method for the class.
Is there any solution for it?