Good afternoon, you need to register to copy the contents of the title and paste into alt and a snag is that I only have at output 1 the $product_stickers variable and with the help of it you need to do it all.
- That is, the value of title and alt is in the $ product_stickers variable or how? - Dmitriy Kondratiuk
- @DmitriyKondratiuk in the variable <img src = "/ delivery-car-180x30.png" title = "free shipping"> I would correct the controller and add alt but the problem is that the controller is encrypted - Andry
- I understand you better attribute change already on the frontend through jquery - Dmitriy Kondratiuk
- @DmitriyKondratiuk I honestly thought about it. But I don’t know how right it is :) Thank you for trying - Andry
|
1 answer
$(function() { $(document).ready(function(){ var title_text = $("title").text(); $("img").attr("alt", title_text); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <html> <head> <title>Some title</title> </head> <body> <img src="/delivery-car-180x30.png" title="бесплатной доставкой"> </body> </html> |