lletleads Posted January 8 Posted January 8 Hi, Would be possible to make images as lightbox (so when someone clicks on them they show up as a full screen) that I added through an URL method and this query: <script> document.querySelectorAll('.accordion-item__description').forEach((item) => { item.querySelectorAll('a').forEach((link) => { if(link.querySelector('strong')) { const imgSrc = link.href; const img = document.createElement('img'); img.src = imgSrc; img.alt = link.querySelector('strong').innerText; img.style.maxWidth = '100%'; link.replaceWith(img); } }) }); </script> Ste Url: https://oarfish-grapefruit-g8wm.squarespace.com/ Pass: ricestring Thanks in advance
tuanphan Posted January 10 Posted January 10 Hi, Which images are you referring to? I don't see Accordion on homepage Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
lletleads Posted January 10 Author Posted January 10 6 hours ago, tuanphan said: Hi, Which images are you referring to? I don't see Accordion on homepage HI the accordion is in the MENU page, Every iTem has an image. I would like to make a lightbox for every Image
lletleads Posted January 13 Author Posted January 13 On 1/10/2024 at 10:10 AM, lletleads said: HI the accordion is in the MENU page, Every iTem has an image. I would like to make a lightbox for every Image So It's like an online menu where people can click on the item and can show the image full screen Would be awesome
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment