Answer the question
In order to leave comments, you need to log in
How to get the attribute value of the clicked element in VUE JS?
Hello. Here is the code https://jsfiddle.net/prL6axfL/11/
There is such a piece
methods: {
goIndex: function(){
alert( "hello index" );
}
}
I want to get the value of the data-index attribute on the div with the button class, these are actually switches. But it didn’t work out for me, I know there are specifics in vue. Please tell me how to get the value of the clicked attribute in my case...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question