FROM CACHE - fr_header

Magnific popup alt attribute in image popup

creationacc
Nouveau membre
6 0 0

Hello,

 

I have been trying to add alt attribute to img tag generated by Magnific popup tool. But I don't manage to make it work.

Currently, I choosed vintage "minimal" theme : In file theme.js, a piece of Magnific popup code doesn't work : getImage function doesn't render alt attribute.

 

 

: function (c, d) {...}, following code is written by no alt : 

,c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt"))

--> no alt anyway <img src=".//cdn.shopify.com/s/files/1/0111/3663/..........">






Test 1 : I tried to add
j.alt="MyAlt", --> working <img alt="MyAlt"....>

Test 2 : I tried to add
j.alt=c.el --> alt="[object Object]"

Test 3 : I tried to add
j.alt=c.el.find("img") --> alt="[object Object]"

Test 4 :
j.alt=c.el.find("img").attr("alt") --> alt="undefined"

Test 5 :
j.alt=c.el.find("img").attr("src") --> alt="undefined"

Test 6 :
j.alt=c.src --> alt="//cdn.shopify.com/s/files/1/0111/3663/0884/products/etuiprotectionkobo-35.jpg?v=1668278998"

 

 

 

More details here 

 

Thanks for you help

0 RÉPONSES 0