I would like to ask you if there is any javascript method to grab link title and use it or change it to data-caption in fancybox 3? The only condition is if the link title exists.
This is what I have now:
<a data-fancybox="gallery" title="some-title" href="big_1.jpg">
<img src="small_1.jpg">
</a>
and I would like to somehow change it to this:
<a data-fancybox="gallery" data-caption="some-title" href="big_1.jpg">
<img src="small_1.jpg">
</a>
Thanks for all help.
use some JS code to do