I’m currently working on a site where I have a multi-image input in the CMS, which is displayed in a grid on the page. Is there a way to show the alt text when you hover over the image?
Any help would be greatly appreciated
Sorry to bump this up - is anybody able to assist? Thank you!
Here’s an updated link -
Webflow - Wildpark Entertainment
Hi everyone, sorry - super desparate to resolve if anybody’s able to assist;
@thomasjpm here is short video of one way how to display image Alt text on image hover. It is combination of custom JS code and WF animation but feel free to use other approach like only custom code.
Here is code I’ve used in demo to have something to start with
const [...multi] = document.querySelectorAll(".multi-img__w")
const altHolder = img.querySelector(".img-alt-content")
const alt = img.querySelector("img").getAttribute("alt")
altHolder.innerText = alt
Hope that will help to solve your request
@thomasjpm do you need further assistance with provided solution?
Hi Stan, firstly thank you so much for taking the time to record this and help - I really appreciate it.
I’ve followed everything but am having a little difficulty with where to place the code - are you able to advise?
@thomasjpm there are 3 places you can add any custom code:
Site setting => code will be applied on each page
Page setting => code will be applied on current page
Embed element => code will be applied on current page
If you willing to learn more about where and why to place custom code please visit WFUniversity to learn how to work with this platform or use search field of this forum to find information you need.
Once you will be able to make it work by applying code to let say eg. to page setting feel free to close your request as solved.
code in page setting
Thank you so, so, so much - this works brilliantly and was so simple to implement.
Really grateful for your time and hope you have a great week!
Thank you for your answer!!