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
For paid 1-on-1 Lay Theme Coaching, contact Audrey (audrey@cyberslayers.work) or me (info@laytheme.com).
We also code custom websites or bespoke Lay features. Drop me a line at info@laytheme.com or check out my work at arminunruh.com.
Want to support my work? paypal.me/arminunruh
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it