multiple carousel + each caption on hover
-
hey,
i was wondering if it is possible to have multiple carousels on one page while displaying their caption on hover?
(because of using the .lay-carousel-sink-parent class with jquery it fades in all at the same time)eventually there is a selector to target the captions of each carousel?
thanks in advance,
johannesedit: it is possible to achieve by adding a custom class to the carousel and then use this custom class to target the captions for each carousel
-
hey,
i was wondering if it is possible to have multiple carousels on one page while displaying their caption on hover?
(because of using the .lay-carousel-sink-parent class with jquery it fades in all at the same time)eventually there is a selector to target the captions of each carousel?
thanks in advance,
johannesedit: it is possible to achieve by adding a custom class to the carousel and then use this custom class to target the captions for each carousel
anyone with similar problem:
the solution is to give each carousel an id and then you can target the caption with the help of the id in jquery for example:jQuery(document).on("mouseenter", "#carousel-id", function(event) { jQuery("#carousel-id .lay-carousel-sink-parent").animate({ opacity: 1 }, 1000); }); jQuery(document).on("mouseleave", "#carousel-id", function(event) { jQuery("#carousel-id .lay-carousel-sink-parent").animate({ opacity: 0 }, 1000); }); -
ah very nice!
-
maybe this is better, without js:
#carousel-id .lay-carousel-sink-parent{ opacity: 0; transition: opacity 1000ms ease; } #carousel-id:hover .lay-carousel-sink-parent{ opacity: 1; } -
maybe this is better, without js:
#carousel-id .lay-carousel-sink-parent{ opacity: 0; transition: opacity 1000ms ease; } #carousel-id:hover .lay-carousel-sink-parent{ opacity: 1; }@arminunruh thank you! guess css even better and faster
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login