S
S
semki0962019-05-31 12:57:56
Vue.js
semki096, 2019-05-31 12:57:56

How to handle event (click in bootstrap carousel) in vue.js?

I have a bootstrap slider that scrolls when you click on thumbnails - thumbnails. Thumbnails have an 'alt' attribute. Is it possible to correctly handle a click on a given preview in vue.js to get the given attribute? And how to do it (if such an approach has the right to exist)?
<img src="/img.png" v-bind:alt="color-red">

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Leonid Lupenko, 2019-05-31
@Tabita_kun

<img src="/img.png" v-bind:alt="color-red" @click="fn">

And fn will get the first click-event argument. Just event.target.getAttribute('alt') is enough.

A
Anton Anton, 2019-05-31
@Fragster

https://bootstrap-vue.js.org/docs/components/carousel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question