Closed acwolff closed 3 years ago
I did find the solution:
afterLoad: function(instance, slide) {
slide.$slide.find('img').attr("alt", slide.opts.$orig.data('alt'));
slide.$slide.find('img').attr("title", slide.opts.$orig.data('title'));
},
I know that I can use data-caption to add a description to the light-box image. But how can I add an alt and a title attribute? I can't find a data-alt or data-title attribute. description.
Edit:
I tried this:
The consol;e logs the correct data, but no title or alt attribute is added. What should I change or add?