-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: mouseover and mouseleave events for individual slides to activate tooltip #31
Comments
Hi @rolandjlevy, |
Hi @antoniandre That's great news - thank you. Is it also possible to pass the slide object as a parameter of a function so that the rect properties of the slide can be captured to enable the tooltip to position to individual slides? Something like this:
In VueJS component:
Many thanks, |
Hi @antoniandre, Here is an updated demo of what I have in mind for the tooltips: https://repl.it/@rjlevy/Vue-carousel-vueper-slides-v3 Many thanks :) |
Hi @rolandjlevy, This is now available from version 1.18.0. Use it like that: Vue template <vueper-slides>
<vueper-slide
v-for="(slide, key) in slides"
:key="key"
:image="slide.image"
@mouseover="showTooltip"
@mouseleave="active = false">
</vueper-slide>
</vueper-slides>
<div v-if="active" class="tooltip">{{selectedTooltip}}</div> JS methods: {
showTooltip (slide, el) {
console.log(slide, el)
}
} Hope it helps. |
Hi @antoniandre, Wow, that was quick. Thanks so much! I have tried to implement the changes but can't get it to work. There isn't anything logging from showTooltip function. Here is a demo with the new mouseover and mouseleave events Am I doing something wrong? Roland |
Hi @rolandjlevy, Also repl.it seem to not like console log of objects, you can test with Last thing, make sure to hit the latest vueperslides version, in case there is cache write: Cheers. |
Hi @antoniandre, Great, making those changes fixed the problem, console.log(slide.image) works fine :) However, console.log(el) gives the following warning:
Any thoughts on why this is happening? Thanks, |
Hi @antoniandre, Its OK, we worked it out, by using the following. So please ignore the last message - there is no problem!
Here is an updated demo with the tooltip functionality now working: https://repl.it/@rjlevy/Vue-carousel-vueper-slides-v6-simplified My colleagues and I have starred this GitHub to say thank you. Also, to show our appreciation we wanted to buy you a drink but seeing as you are on the other side of the world we are sending you a small gift via your website. You really saved us a lot of time and helped us so quickly. Cheers! |
Awesome @rolandjlevy. Happy Wednesday, Antoni |
Hi @antoniandre, That's great! 🥇 happy Wednesday to you too. Have a fantastic week Cheers! |
Hi Antoni
I am really enjoying using vueper-slides. I think its great. Thanks for creating it!
I am trying to show / hide a tooltip for each slide in the carousel but can't access the mouseover and mouseleave events for individual slides.
Ideally, I would like to add @mouseOver="active = true" @mouseleave="active = false" to each slide. So that the tooltip div can be toggled. Something like this:
<vueper-slides><vueper-slide v-for="(slide, key) in slides" :key="key" :image="slide.image" @mouseover="active = true" @mouseleave="active = false"></vueper-slide></vueper-slides><div v-if="active" class="tooltip">{{selectedImage}}</div>
Is this something that exists and if not, could you add this feature? I have a demo here: https://repl.it/@rjlevy/Vue-carousel-vueper-slides-v3
Looking forward to hearing from you.
Thanks,
Roland
The text was updated successfully, but these errors were encountered: